mirror of
https://github.com/mdgriffith/elm-ui.git
synced 2024-11-29 15:24:07 +03:00
Merge pull request #210 from alexkorban/issue197
Add test for issue 197
This commit is contained in:
commit
dbf8850def
44
tests-rendering/cases/open/StackedScrollingColumnsHeight.elm
Normal file
44
tests-rendering/cases/open/StackedScrollingColumnsHeight.elm
Normal file
@ -0,0 +1,44 @@
|
||||
module StackedScrollingColumnsHeight exposing (..)
|
||||
|
||||
{-|
|
||||
|
||||
|
||||
# Column height can be set incorrectly for two stacked columns with scrollbarY
|
||||
|
||||
<https://github.com/mdgriffith/elm-ui/issues/197>
|
||||
|
||||
Both red and green columns should always have equal height.
|
||||
|
||||
Currently, the height is set incorrectly if only one column has enough content to scroll.
|
||||
|
||||
Both columns are correctly set to the same height only if neither has enough content
|
||||
to scroll or if both have enough content to scroll.
|
||||
|
||||
-}
|
||||
|
||||
import Html exposing (Html)
|
||||
import Testable.Element exposing (..)
|
||||
import Testable.Element.Background as Background
|
||||
|
||||
|
||||
main : Html msg
|
||||
main =
|
||||
layout [ height fill ] <|
|
||||
column [ height fill ]
|
||||
[ column
|
||||
[ height fill
|
||||
, scrollbarY
|
||||
, Background.color (rgb 0 255 0)
|
||||
]
|
||||
<|
|
||||
List.map (\_ -> text "Hello") <|
|
||||
List.range 1 20
|
||||
, column
|
||||
[ height fill
|
||||
, scrollbarY
|
||||
, Background.color (rgb 255 0 0)
|
||||
]
|
||||
<|
|
||||
List.map (\_ -> text "Hello") <|
|
||||
List.range 1 3
|
||||
]
|
Loading…
Reference in New Issue
Block a user