diff --git a/src/components/media.jsx b/src/components/media.jsx index 82d48a05..60054d48 100644 --- a/src/components/media.jsx +++ b/src/components/media.jsx @@ -374,7 +374,7 @@ function Media({ Math.abs(naturalAspectRatio - displayAspectRatio) < similarThreshold ) { - $media.classList.add('has-natural-aspect-ratio'); + $media.dataset.hasNaturalAspectRatio = true; } // $media.dataset.aspectRatios = `${naturalAspectRatio} ${displayAspectRatio}`; } diff --git a/src/components/status.css b/src/components/status.css index 7f88042b..2f4c1488 100644 --- a/src/components/status.css +++ b/src/components/status.css @@ -1071,7 +1071,7 @@ width: min(var(--aspectWidth), var(--width), 100%); max-height: min(var(--height), 33vh); - &.has-natural-aspect-ratio { + &[data-has-natural-aspect-ratio] { --media-radius: 4px; } }