git.iko.soy/typeable/elm-ui
on master help sign in
resolves #62 - set a max width/height 100% on images with object-fit: cover. This should make it so that with `height fill` or `width: fill` set, images respond appropriately. If both are set, then the image should maintain it's aspect ratio and crop to fit.
commitfe2b14b87e0f15cf1ff28e29c9f7d93f0235fcc3 authormdgriffith <mdgriffith@users.noreply.github.com> dateThu 21 May 2020, 20:42 (6 years ago) parentb195afb
1 file changed+5
src/Internal/Style.elm+5
src/Internal/Style.elm+5
@@ -961,6 +961,11 @@ baseSheet =
961961 ]
962962 , Class (dot classes.any ++ dot classes.single ++ dot classes.imageContainer)
963963 [ Prop "display" "block"
964+ , Child "img"
965+ [ Prop "max-height" "100%"
966+ , Prop "max-width" "100%"
967+ , Prop "object-fit" "cover"
968+ ]
964969 ]
965970 , Class (dot classes.any ++ ":focus")
966971 [ Prop "outline" "none"