From 71d52a49cd7fb129958ffe96ed3c6bfa9fb68dbe Mon Sep 17 00:00:00 2001 From: girst Date: Mon, 17 Aug 2020 21:08:39 +0200 Subject: [PATCH] don't rely on calc(max()) css to get video to display couldn't watch on my firefox-android 68 (but can now :D) --- app/static/style.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/static/style.css b/app/static/style.css index 458e957..ba4c94c 100644 --- a/app/static/style.css +++ b/app/static/style.css @@ -247,7 +247,11 @@ ul#submgr{list-style: none} /* https://stackoverflow.com/a/20201563 */ .aspect-ratio { position: relative; - /* Note: clamping aspect-ratio, to avoid vertical videos going off-screen */ + padding-top: calc( 100% / var(--aspect-ratio) ); +} +/* Note: clamping aspect-ratio to avoid vertical videos going +off-screen, but only on browsers that support nesting calc/max: */ +@supports (padding:calc(100%/max(1))) { padding-top: calc( 100% / max(var(--aspect-ratio), 4/3) ); } .aspect-ratio video { -- 2.39.3