mirror of
https://github.com/mdgriffith/elm-ui.git
synced 2024-12-01 21:53:18 +03:00
Merge pull request #209 from lucamug/master
Test for the Issue #201 https://github.com/mdgriffith/elm-ui/issues/201
This commit is contained in:
commit
79f5e1e409
@ -0,0 +1,46 @@
|
|||||||
|
module InFrontSize exposing (main)
|
||||||
|
|
||||||
|
{-|
|
||||||
|
|
||||||
|
|
||||||
|
# inFront elements with width fill are contained within the parent's border
|
||||||
|
|
||||||
|
Though they're expected to be the actual size of the parent.
|
||||||
|
|
||||||
|
<https://ellie-app.com/8J4KqjL3zGHa1>
|
||||||
|
|
||||||
|
<https://github.com/mdgriffith/elm-ui/issues/201>
|
||||||
|
|
||||||
|
-}
|
||||||
|
|
||||||
|
import Browser
|
||||||
|
import Html exposing (Html)
|
||||||
|
import Testable.Element exposing (..)
|
||||||
|
import Testable.Element.Background as Background
|
||||||
|
import Testable.Element.Border as Border
|
||||||
|
|
||||||
|
|
||||||
|
main =
|
||||||
|
layout []
|
||||||
|
(el
|
||||||
|
[ width (px 100)
|
||||||
|
, height (px 100)
|
||||||
|
, centerX
|
||||||
|
, centerY
|
||||||
|
, Background.color (rgb 0.1 0.1 0.1)
|
||||||
|
, Border.width 20
|
||||||
|
, Border.color (rgb 0.5 1 1)
|
||||||
|
|
||||||
|
-- the following element should cover the parent's border
|
||||||
|
, inFront
|
||||||
|
(el
|
||||||
|
[ width fill
|
||||||
|
, height fill
|
||||||
|
, Background.color (rgb 0.1 0.5 0.9)
|
||||||
|
, moveUp 40
|
||||||
|
]
|
||||||
|
none
|
||||||
|
)
|
||||||
|
]
|
||||||
|
none
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user