perf: use more efficient CSS selectors for inline media (#1423)
This commit is contained in:
parent
8c6a701d6f
commit
7188454790
|
@ -1,7 +1,7 @@
|
||||||
{#if !blurhash && (type === 'video' || type === 'audio')}
|
{#if !blurhash && (type === 'video' || type === 'audio')}
|
||||||
<button id={elementId}
|
<button id={elementId}
|
||||||
type="button"
|
type="button"
|
||||||
class="play-video-button focus-after {$largeInlineMedia ? '' : 'fixed-size'} {type === 'audio' ? 'play-audio-button' : ''}"
|
class="inline-media play-video-button focus-after {$largeInlineMedia ? '' : 'fixed-size'} {type === 'audio' ? 'play-audio-button' : ''}"
|
||||||
aria-label="Play video: {description}"
|
aria-label="Play video: {description}"
|
||||||
style="width: {inlineWidth}px; height: {inlineHeight}px;">
|
style="width: {inlineWidth}px; height: {inlineHeight}px;">
|
||||||
<PlayVideoIcon />
|
<PlayVideoIcon />
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
{:else}
|
{:else}
|
||||||
<button id={elementId}
|
<button id={elementId}
|
||||||
type="button"
|
type="button"
|
||||||
class="show-image-button focus-after {$largeInlineMedia ? '' : 'fixed-size'}"
|
class="inline-media show-image-button focus-after {$largeInlineMedia ? '' : 'fixed-size'}"
|
||||||
aria-label="Show image: {description}"
|
aria-label="Show image: {description}"
|
||||||
title={description}
|
title={description}
|
||||||
on:mouseover="set({mouseover: event})"
|
on:mouseover="set({mouseover: event})"
|
||||||
|
|
|
@ -23,16 +23,16 @@
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-media.grouped-images > :global(*) {
|
.status-media.grouped-images > :global(.inline-media) {
|
||||||
padding-bottom: 56.25%;
|
padding-bottom: 56.25%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-media.grouped-images.two-cols > :global(*) {
|
.status-media.grouped-images.two-cols > :global(.inline-media) {
|
||||||
padding-bottom: calc(112.5% + 5px);
|
padding-bottom: calc(112.5% + 5px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-media.grouped-images.odd-cols > :global(:first-child) {
|
.status-media.grouped-images.odd-cols > :global(.inline-media:first-child) {
|
||||||
grid-row-end: span 2;
|
grid-row-end: span 2;
|
||||||
padding-bottom: calc(112.5% + 5px);
|
padding-bottom: calc(112.5% + 5px);
|
||||||
background-color: blue;
|
background-color: blue;
|
||||||
|
|
Loading…
Reference in a new issue