Skip to content

Commit

Permalink
use document.documentElement
Browse files Browse the repository at this point in the history
  • Loading branch information
marcustyphoon committed Nov 7, 2024
1 parent 4a53d3b commit f545e7b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/features/panorama.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ ${keyToCss('cell')}, ${postSelector}
}
/* Center non-expanded content */
body:not(.${expandMediaClass}) ${postSelector}
:root:not(.${expandMediaClass}) ${postSelector}
:is(
${keyToCss('videoBlock', 'audioBlock', 'link', 'pollBlock', 'imageBlockLink')},
figure${keyToCss('imageBlock')}:not(${keyToCss('unstretched')})
Expand All @@ -88,18 +88,18 @@ body:not(.${expandMediaClass}) ${postSelector}
}
/* Widen + lock aspect ratios of expanded content */
body.${expandMediaClass} ${postSelector}
:root.${expandMediaClass} ${postSelector}
:is(
${keyToCss('videoBlock', 'audioBlock', 'link', 'pollBlock')},
${keyToCss('videoBlock')} iframe
) {
max-width: unset !important;
}
body.${expandMediaClass} ${postSelector} ${keyToCss('videoBlock')} iframe[style*="${aspectRatioVar}"] {
:root.${expandMediaClass} ${postSelector} ${keyToCss('videoBlock')} iframe[style*="${aspectRatioVar}"] {
aspect-ratio: var(${aspectRatioVar});
height: unset !important;
}
body.${expandMediaClass} ${postSelector} a > ${keyToCss('withImage')} {
:root.${expandMediaClass} ${postSelector} a > ${keyToCss('withImage')} {
aspect-ratio: 2;
height: unset !important;
}
Expand Down

0 comments on commit f545e7b

Please sign in to comment.