git.iko.soy/typeable/elm-ui
on master help sign in
resolves #203, does not regress #147, and sheds some other light on stuff
commit42d0dae608c03a9bc340cf5194555ba2403869ee authormdgriffith <mdgriffith@users.noreply.github.com> dateSat 25 Jul 2020, 19:08 (6 years ago) parent263e8fd
2 files changed+12−2
src/Internal/Model.elm+3−1 src/Internal/Style.elm+9−1
src/Internal/Model.elm+3−1
@@ -1478,7 +1478,9 @@ renderHeight h =
14781478 Single
14791479 cls
14801480 "min-height"
1481− (String.fromInt minSize ++ "px")
1481+ -- This needs to be !important because we're using `min-height: min-content`
1482+ -- to correct for safari's incorrect implementation of flexbox.
1483+ (String.fromInt minSize ++ "px !important")
14821484
14831485 ( newFlag, newAttrs, newStyle ) =
14841486 renderHeight len
src/Internal/Style.elm+9−1
@@ -1384,7 +1384,15 @@ baseSheet =
13841384 -- This apparently is a different story for columns.
13851385 -- Safari has an issue if this is flex-basis: 0%, as it goes entirely to 0,
13861386 -- instead of the expected content size.
1387− [ Prop "flex-basis" "auto"
1387+ -- So we add `min-height: min-content`, which isn't supported by IE, but works for all other browsers!
1388+ -- Separately, 0% is different than 0px, but only for columns
1389+ -- In columns, 0% will actually be calculated as `auto` for columns
1390+ -- So, 0px is the one we want.
1391+ [ Prop "flex-basis" "0px"
1392+ , Prop "min-height" "min-content"
1393+ , Descriptor (dot classes.heightExact)
1394+ [ Prop "flex-basis" "auto"
1395+ ]
13881396 ]
13891397 , Child (dot classes.heightFill)
13901398 [ Prop "flex-grow" "100000"