git.iko.soy/typeable/elm-ui
on master help sign in
Add test for issue 197
18e00c2Alex Korban
tests-rendering/cases/open/StackedScrollingColumnsHeight.elmnew file+44
@@ -0,0 +1,44 @@
1+module StackedScrollingColumnsHeight exposing (..)
2+
3+{-|
4+
5+
6+# Column height can be set incorrectly for two stacked columns with scrollbarY
7+
8+<https://github.com/mdgriffith/elm-ui/issues/197>
9+
10+Both red and green columns should always have equal height.
11+
12+Currently, the height is set incorrectly if only one column has enough content to scroll.
13+
14+Both columns are correctly set to the same height only if neither has enough content
15+to scroll or if both have enough content to scroll.
16+
17+-}
18+
19+import Html exposing (Html)
20+import Testable.Element exposing (..)
21+import Testable.Element.Background as Background
22+
23+
24+main : Html msg
25+main =
26+ layout [ height fill ] <|
27+ column [ height fill ]
28+ [ column
29+ [ height fill
30+ , scrollbarY
31+ , Background.color (rgb 0 255 0)
32+ ]
33+ <|
34+ List.map (\_ -> text "Hello") <|
35+ List.range 1 20
36+ , column
37+ [ height fill
38+ , scrollbarY
39+ , Background.color (rgb 255 0 0)
40+ ]
41+ <|
42+ List.map (\_ -> text "Hello") <|
43+ List.range 1 3
44+ ]