Skip to content

Commit

Permalink
THEMES-1322 - fix: lead art gallery aspect ratio (#1716)
Browse files Browse the repository at this point in the history
fix: lead art gallery aspect ratio

Co-authored-by: Alfonso Andrés López Molina <[email protected]>
  • Loading branch information
osnoser1 and Alfonso Andrés López Molina authored Aug 9, 2023
1 parent f86ef43 commit b933214
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
14 changes: 7 additions & 7 deletions .storybook/themes/news.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1743,21 +1743,20 @@
width: var(--global-spacing-4),
),
image: (
width: 100%,
max-height: 100%,
object-fit: contain,
),
),
),
lead-art-carousel-image-wrapper: (
align-items: center,
aspect-ratio: calc(16 / 9),
background-color: var(--global-black),
display: flex,
justify-content: center,
max-height: 75vh,
background-color: var(--global-black),
max-height: unset,
overflow: auto,
components: (
image: (
width: auto,
max-height: 75vh,
),
button: (
position: fixed,
top: var(--global-spacing-6),
Expand Down Expand Up @@ -3023,6 +3022,7 @@
left: var(--global-spacing-4),
),
lead-art-carousel-image-wrapper: (
max-height: 75vh,
components: (
button-medium: (
left: var(--global-spacing-4),
Expand Down
1 change: 0 additions & 1 deletion blocks/lead-art-block/features/leadart/default.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ export const LeadArtPresentation = (props) => {
<Image
ansImage={galleryItem}
// 16:9 aspect ratio
width={800}
height={450}
responsiveImages={[800, 1600]}
alt={galleryItem.alt_text}
Expand Down
14 changes: 7 additions & 7 deletions blocks/lead-art-block/themes/news.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
"width": "var(--global-spacing-4)"
},
"image": {
"width": "100%"
"max-height": "100%",
"object-fit": "contain"
}
}
},
Expand All @@ -78,15 +79,13 @@
"styles": {
"default": {
"align-items": "center",
"aspect-ratio": "calc(16/9)",
"background-color": "var(--global-black)",
"display": "flex",
"justify-content": "center",
"max-height": "75vh",
"background-color": "var(--global-black)",
"max-height": "unset",
"overflow": "auto",
"components": {
"image": {
"width": "auto",
"max-height": "75vh"
},
"button": {
"position": "fixed",
"top": "var(--global-spacing-6)",
Expand All @@ -105,6 +104,7 @@
}
},
"desktop": {
"max-height": "75vh",
"components": {
"button-medium": {
"left": "var(--global-spacing-4)"
Expand Down

0 comments on commit b933214

Please sign in to comment.