Add test for issue 190

This commit is contained in:
Alex Korban 2020-05-04 09:11:04 +12:00
parent 80e267c890
commit d6d2a8ae0f

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" ]