From de0d05b6a60b27327706d53d38ad7aae8fe02ceb Mon Sep 17 00:00:00 2001 From: nie Date: Tue, 22 Dec 2020 09:25:53 +0000 Subject: [PATCH] [FIX] website: gallery cover img inside anchor is not well placed Steps: - Go to "Website" > "Go to Website" - Click Edit - Add an image gallery - Add an image to the gallery - Add the same image to the gallery - Click the first image - Click "Image Cover" in the side panel - Click on the Link button in the bottom-right of the side panel - Add a link and save Bug: The first image is not displayed in the same way as the second one. Explanation: The layout is not carried over to `img` when it's nested into an `a` tag. Redefining the layout on the `a` tag fixes the issue. opw:2394953 closes odoo/odoo#63699 X-original-commit: b34d27449920cfd683223969fd9d24a19e715d04 Signed-off-by: Nicolas Lempereur (nle) Signed-off-by: backspac --- .../static/src/snippets/s_image_gallery/001.scss | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/addons/website/static/src/snippets/s_image_gallery/001.scss b/addons/website/static/src/snippets/s_image_gallery/001.scss index 5d16381ec7b..b20d0be30f6 100644 --- a/addons/website/static/src/snippets/s_image_gallery/001.scss +++ b/addons/website/static/src/snippets/s_image_gallery/001.scss @@ -115,10 +115,17 @@ > .container, > .container-fluid, > .o_container_small { height: 100%; } - &.s_image_gallery_cover .carousel-item > img { - width: 100%; - height: 100%; - object-fit: cover; + &.s_image_gallery_cover .carousel-item { + > a { + width: 100%; + height: 100%; + } + > a > img, + > img { + width: 100%; + height: 100%; + object-fit: cover; + } } &:not(.s_image_gallery_show_indicators) .carousel { ul.carousel-indicators {