diff --git a/godoc/static/static.go b/godoc/static/static.go index 45478e3c22..22351f2f0d 100644 --- a/godoc/static/static.go +++ b/godoc/static/static.go @@ -3479,6 +3479,22 @@ div#blog .read { text-align: right; } +@supports (--c: 0) { + [style*="--aspect-ratio-padding:"] { + position: relative; + overflow: hidden; + padding-top: var(--aspect-ratio-padding); + } + + [style*="--aspect-ratio-padding:"]>* { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } +} + .toggleButton { cursor: pointer; } .toggle > .collapsed { display: block; } .toggle > .expanded { display: none; } diff --git a/godoc/static/style.css b/godoc/static/style.css index cf2f47ae69..3d1b1a0125 100644 --- a/godoc/static/style.css +++ b/godoc/static/style.css @@ -476,6 +476,22 @@ div#blog .read { text-align: right; } +@supports (--c: 0) { + [style*="--aspect-ratio-padding:"] { + position: relative; + overflow: hidden; + padding-top: var(--aspect-ratio-padding); + } + + [style*="--aspect-ratio-padding:"]>* { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } +} + .toggleButton { cursor: pointer; } .toggle > .collapsed { display: block; } .toggle > .expanded { display: none; }