diff --git a/main/assets/css/base/_util.scss b/main/assets/css/base/_util.scss index ec16ff1..f932ea9 100644 --- a/main/assets/css/base/_util.scss +++ b/main/assets/css/base/_util.scss @@ -64,20 +64,29 @@ [class^="aspect-ratio"], [class*=" aspect-ratio"] { --aspect-ratio: calc(16/9); - position: relative; - height: 0; - padding-bottom: calc(100%/(var(--aspect-ratio))); + + @supports not (aspect-ratio: 1/1) { + position: relative; + height: 0; + padding-bottom: calc(100%/(var(--aspect-ratio))); + } > * { - position: absolute; - top: 0; - left: 0; width: 100%; - height: 100%; + height: auto; + aspect-ratio: var(--aspect-ratio); &:not(iframe) { object-fit: cover; } + + @supports not (aspect-ratio: 1/1) { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } } }