Merge pull request #212 from alexkorban/issue190

Add test for issue 190
This commit is contained in:
Matthew Griffith 2020-05-10 10:08:11 -04:00 committed by GitHub
commit 4b73443eef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,36 @@
module ElInFixedHeightColumn exposing (..)
{-| el inside a fixed height column is rendered with zero height in Safari
<https://github.com/mdgriffith/elm-ui/issues/190>
If I put an el into a column of fixed height, the el is rendered with zero height
in Safari:
layout [] <|
column
[ width fill
, height <| px 200
][ el [ Border.width 3, Border.color <| rgb255 0 0 0 ] <| text "an element" ]
Adding htmlAttribute <| Attr.style "flex-basis" "auto" to the el is a workaround
that fixes the problem in this instance.
Expected behavior
Element should be rendered the same as in Firefox & Chrome, with the border going
around the text.
-}
import Testable.Element exposing (..)
import Testable.Element.Border as Border
main =
layout [] <|
column
[ width fill
, height <| px 200
]
[ el [ Border.width 3, Border.color <| rgb 0 0 0 ] <| text "an element" ]