git.iko.soy/typeable/elm-ui
on master help sign in
Merge pull request #209 from lucamug/master

Test for the Issue #201 https://github.com/mdgriffith/elm-ui/issues/201

commit79f5e1e40932626b5173e7bd0fac3d9ee2d69574 authorMatthew Griffith <mdg.griffith@gmail.com> dateSun 10 May 2020, 10:12 (6 years ago) parent4b73443189f17f
1 file changed+46
tests-rendering/cases/open/InFrontContainedParentsIssue201.elm+46
tests-rendering/cases/open/InFrontContainedParentsIssue201.elmnew file+46
@@ -0,0 +1,46 @@
1+module InFrontSize exposing (main)
2+
3+{-|
4+
5+
6+# inFront elements with width fill are contained within the parent's border
7+
8+Though they're expected to be the actual size of the parent.
9+
10+<https://ellie-app.com/8J4KqjL3zGHa1>
11+
12+<https://github.com/mdgriffith/elm-ui/issues/201>
13+
14+-}
15+
16+import Browser
17+import Html exposing (Html)
18+import Testable.Element exposing (..)
19+import Testable.Element.Background as Background
20+import Testable.Element.Border as Border
21+
22+
23+main =
24+ layout []
25+ (el
26+ [ width (px 100)
27+ , height (px 100)
28+ , centerX
29+ , centerY
30+ , Background.color (rgb 0.1 0.1 0.1)
31+ , Border.width 20
32+ , Border.color (rgb 0.5 1 1)
33+
34+ -- the following element should cover the parent's border
35+ , inFront
36+ (el
37+ [ width fill
38+ , height fill
39+ , Background.color (rgb 0.1 0.5 0.9)
40+ , moveUp 40
41+ ]
42+ none
43+ )
44+ ]
45+ none
46+ )