diff options
| author | nie <nie@odoo.com> | 2020-12-15 08:23:38 +0000 |
|---|---|---|
| committer | nie <nie@odoo.com> | 2020-12-16 10:11:01 +0000 |
| commit | a9c96699e5d96ef8a17dfcf61e5693feba2a5481 (patch) | |
| tree | 815de6f56d477596f700299581a1d303c8ffea8a /addons/website/static | |
| parent | d99d9dd329ada8c8696b470cc1c36d270fd66848 (diff) | |
[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#63364
Signed-off-by: backspac <backspac@users.noreply.github.com>
Diffstat (limited to 'addons/website/static')
| -rw-r--r-- | addons/website/static/src/snippets/s_image_gallery/001.scss | 16 |
1 files changed, 12 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 9dfb81902db..5d16381ec7b 100644 --- a/addons/website/static/src/snippets/s_image_gallery/001.scss +++ b/addons/website/static/src/snippets/s_image_gallery/001.scss @@ -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%; |
