Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carousel images size only horizontally #917

Closed
howudodat opened this issue Feb 13, 2024 · 0 comments
Closed

Carousel images size only horizontally #917

howudodat opened this issue Feb 13, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request version 2.x.x Version 2.x.x issues
Milestone

Comments

@howudodat
Copy link

howudodat commented Feb 13, 2024

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

@vegegoku vegegoku self-assigned this Mar 18, 2024
@vegegoku vegegoku added enhancement New feature or request version 2.x.x Version 2.x.x issues labels Mar 18, 2024
@vegegoku vegegoku added this to the 2.0.1 milestone Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request version 2.x.x Version 2.x.x issues
Projects
None yet
Development

No branches or pull requests

2 participants