mirror of
https://github.com/mdgriffith/elm-ui.git
synced 2024-11-25 19:15:09 +03:00
Add test for issue 191
This commit is contained in:
parent
80e267c890
commit
300c8110a3
31
tests-rendering/cases/open/ClippedElInFixedWidthColumn.elm
Normal file
31
tests-rendering/cases/open/ClippedElInFixedWidthColumn.elm
Normal file
@ -0,0 +1,31 @@
|
||||
module ClippedElInFixedWidthColumn exposing (..)
|
||||
|
||||
{-| el [ clip ] inside a fixed-width column rendered with 0px height in Chrome & Firefox
|
||||
|
||||
<https://github.com/mdgriffith/elm-ui/issues/191>
|
||||
|
||||
If an el [ clip ] is placed inside a fixed-width column which is inside a layout
|
||||
with [ width fill, height fill ], then the element is rendered with 0px height in Chrome:
|
||||
|
||||
layout [ width fill, height fill ] <|
|
||||
column [ width <| px 300 ][ el [ clip ] <| text "The quick brown fox" ]
|
||||
|
||||
In Firefox, the element is initially rendered correctly, but is resized to 0px height
|
||||
on viewport resize. In Safari, the element is displayed correctly.
|
||||
|
||||
The above seems to be the minimal reproduction:
|
||||
|
||||
Removing attributes from layout or from column or from el makes the issue disappear.
|
||||
Replacing column [ width <| px 300 ] with column [ width fill ] makes the issue disappear.
|
||||
Replacing column with el also makes the issue disappear.
|
||||
Adding htmlAttribute <| Attr.style "flex-basis" "auto" to clipped el is a workaround.
|
||||
|
||||
-}
|
||||
|
||||
import Testable.Element exposing (..)
|
||||
|
||||
|
||||
main =
|
||||
layout [ width fill, height fill ] <|
|
||||
column [ width <| px 300 ]
|
||||
[ el [ clip ] <| text "The quick brown fox" ]
|
Loading…
Reference in New Issue
Block a user