[FIX] website: gallery img inside anchor is too large
Steps: - Go to "Website" > "Go to Website" - Click Edit - Add an image gallery - Add an image to the gallery - Click the image - Click on the Link button in the bottom-right of the side panel - Add a link and save Bug: The image is too large. Explanation: The flex layout is not carried over to `img` when it's nested into an `a` tag. Redefining the flex layout on the `a` tag fixes the issue. This fixes portrait images: ```css height: 100%; width: 100%; ``` And adding this also fixes landscape and smaller images: ```css display: flex; ``` opw:2394953 closes odoo/odoo#63446 X-original-commit: a9c96699e5d96ef8a17dfcf61e5693feba2a5481 Signed-off-by: backspac <backspac@users.noreply.github.com>
This commit is contained in:
@@ -238,10 +238,18 @@
|
||||
}
|
||||
|
||||
%image-gallery-slideshow-styles {
|
||||
&:not(.s_image_gallery_cover) .carousel-item > img {
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
margin: auto;
|
||||
&:not(.s_image_gallery_cover) .carousel-item {
|
||||
> a {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
> a > img,
|
||||
> img {
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
.carousel {
|
||||
height: 100%;
|
||||
|
||||
Reference in New Issue
Block a user