@@ -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+ )