domino-ui icon indicating copy to clipboard operation
domino-ui copied to clipboard

Carousel images size only horizontally

Open howudodat opened this issue 6 months ago • 0 comments

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 from 2024-02-13 16-08-27

Screenshot showing what it should look like. Screenshot from 2024-02-13 16-08-38

howudodat avatar Feb 13 '24 21:02 howudodat