@@ -61,7 +61,7 @@ const stretchLines = css`
6161const immersiveMediaBelowDesktop = (
6262 headlineBackground : string ,
6363 isMainMediaImage : boolean ,
64- isFixedHeightImage : boolean ,
64+ hasMinimumImageHeight : boolean ,
6565) => css `
6666 ${ until . desktop } {
6767 position : relative;
@@ -79,22 +79,22 @@ const immersiveMediaBelowDesktop = (
7979 position : absolute;
8080 left : 0 ;
8181 right : 0 ;
82- bottom : ${ isFixedHeightImage ? '-1px' : '0' } ;
83- height : ${ isFixedHeightImage
82+ bottom : ${ hasMinimumImageHeight ? '-1px' : '0' } ;
83+ height : ${ hasMinimumImageHeight
8484 ? '180px'
8585 : isMainMediaImage
8686 ? 'min(60%, calc(200% - 120vw + 30px))'
8787 : 'min(60%, 144px)' } ;
8888 z-index : ${ getZIndex ( 'mediaOverlay' ) } ;
8989 background : linear-gradient (
9090 to bottom,
91- rgba (0 , 0 , 0 , ${ isFixedHeightImage ? '0' : '0.08' } ),
92- ${ headlineBackground } ${ isFixedHeightImage ? '100%' : '72%' }
91+ rgba (0 , 0 , 0 , ${ hasMinimumImageHeight ? '0' : '0.08' } ),
92+ ${ headlineBackground } ${ hasMinimumImageHeight ? '100%' : '72%' }
9393 );
9494 backdrop-filter : blur (12px );
9595 mask-image : linear-gradient (
9696 to bottom,
97- transparent ${ isFixedHeightImage ? '0%' : '40%' } ,
97+ transparent ${ hasMinimumImageHeight ? '0%' : '40%' } ,
9898 black 60%
9999 );
100100 pointer-events : none;
@@ -192,7 +192,7 @@ export const StandardLayoutArticleGrid = ({
192192 const isMainMediaImage =
193193 mainMedia ?. _type ===
194194 'model.dotcomrendering.pageElements.ImageBlockElement' ;
195- const isFixedHeightImage = isLabs && isImmersive && isMainMediaImage ;
195+ const hasMinimumImageHeight = isLabs && isImmersive && isMainMediaImage ;
196196 const mainMediaUrl : string | undefined = isMainMediaImage
197197 ? mainMedia . media . allImages [ 0 ] ?. url
198198 : undefined ;
@@ -286,14 +286,16 @@ export const StandardLayoutArticleGrid = ({
286286 ${ immersiveMediaBelowDesktop (
287287 headlineBackgroundImmersive ,
288288 isMainMediaImage ,
289- isFixedHeightImage ,
289+ hasMinimumImageHeight ,
290290 ) }
291291
292- ${ isFixedHeightImage &&
292+ ${ hasMinimumImageHeight &&
293293 css `
294294 ${ until . desktop } {
295295 position : relative;
296- height : 469px ;
296+ min-height : 469px ;
297+ ${ mainMediaAspectRatio != null &&
298+ `aspect-ratio: ${ mainMediaAspectRatio . replace ( ':' , ' / ' ) } ;` }
297299 overflow : hidden;
298300 background-color : ${ headlineBackgroundImmersive } ;
299301
0 commit comments