Skip to content

Commit 847b0a6

Browse files
Switch
1 parent 39ce576 commit 847b0a6

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

dotcom-rendering/src/components/GalleryImage.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,17 @@ export const GalleryImage = ({
7575
return null;
7676
}
7777

78-
const boundedImageStyles = css`
79-
${galleryBodyImageStyles};
80-
max-width: calc(${width / height} * 96vh);
81-
`;
82-
8378
return (
8479
<figure css={styles}>
85-
<div css={boundedImageStyles}>
80+
<div
81+
css={galleryBodyImageStyles}
82+
/**
83+
* This ensures that the image height never goes above 96vh.
84+
*/
85+
style={{
86+
maxWidth: `calc(${width / height} * 96vh)`,
87+
}}
88+
>
8689
{renderingTarget === 'Apps' ? (
8790
<Island priority="critical">
8891
<AppsLightboxImage

0 commit comments

Comments
 (0)