domino-ui
domino-ui copied to clipboard
Carousel images size only horizontally
Describe the bug Carousel images are only stretching horizontally to 100% so a portrait image stretches too high.
To Reproduce Steps to reproduce the behavior: Put a portrait image in a carousel
Proposed Code Change Note: This proposed change doesn't break horizontal images
.dui-carousel-inner>.dui-slide>img.dui,
.dui-carousel-inner>.dui-slide->a.dui>img.dui,
.dui-carousel-inner>.dui-slide->picture.dui img.dui,
.dui-carousel-inner>.dui-slide->a>picture.dui img.dui {
display: block;
max-width: 100%;
width: 100%;
height: 100%;
object-fit: contain;
vertical-align: middle;
border: 0;
}
Please ignore the position of the carousel buttons, that is me playing with something else
Screenshot showing current stretch mode. Note that it stretches to 100% wide and the image is way too tall
Screenshot showing what it should look like.