diff options
| author | Joe Carstairs <118172583+jcarstairs-scottlogic@users.noreply.github.com> | 2023-10-20 13:24:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-20 13:24:56 +0100 |
| commit | b2e3ed96b703f49af556d641eae57c1c4fcd8db0 (patch) | |
| tree | 46ffa547685292dc2907da64275f514ea25a68f4 /scss | |
| parent | a1cabdeaaf3bade1bd0872bcafc52c81f1c31ce8 (diff) | |
| parent | 644f10a3284e034ed5cd2e32f276efd7aff56723 (diff) | |
Merge pull request #19 from Sycamost/object-fit-images
Product images are object-fit:contain
Diffstat (limited to 'scss')
| -rw-r--r-- | scss/modules/link-gallery.scss | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/scss/modules/link-gallery.scss b/scss/modules/link-gallery.scss index d9f9514..c3788dc 100644 --- a/scss/modules/link-gallery.scss +++ b/scss/modules/link-gallery.scss @@ -7,10 +7,17 @@ --gallery-row-image-height: 12rem; --gallery-row-title-height: fit-content; text-align: center; -} -.link-gallery li { - grid-column: span var(--gallery-item-column-span); + li { + grid-column: span var(--gallery-item-column-span); + } + + img { + max-width: 100%; + max-height: 100%; + margin: auto; + object-fit: contain; + } } .link-gallery__container { @@ -26,13 +33,6 @@ border: solid calc(2 * var(--relative-eighth-rem)) var(--text-color); } -.link-gallery img { - max-width: 100%; - max-height: 100%; - margin: auto; - height: auto; -} - .link-gallery__title { width: 100%; height: min-content; |
