From f4b889c7d2275bc60d80fa3b6ee4c7536b02064a Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Sun, 15 Nov 2026 22:16:34 -0500 Subject: [PATCH] Make the fullscreen CSS rules apply in every browser (#442) Each fullscreen rule listed :fullscreen beside prefixed forms in a plain selector list. One pseudo-class a browser does not know invalidates the whole rule, and every browser rejects one of them (Firefox :-webkit-full-screen, Chromium :-moz-full-screen), so the album badge was never hidden in fullscreen, and in Firefox neither were the phone sheets nor the grid's fullscreen height. Wrap the alternatives in :is(), whose forgiving selector list drops only the unknown one. Co-Authored-By: Claude Opus 5.5 --- photomap/frontend/static/css/grid-view.css | 8 ++++---- photomap/frontend/static/css/mobile-sheets.css | 6 +++--- photomap/frontend/static/css/seek-slider.css | 11 +++++++---- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/photomap/frontend/static/css/grid-view.css b/photomap/frontend/static/css/grid-view.css index db11a130..3aa19199 100644 --- a/photomap/frontend/static/css/grid-view.css +++ b/photomap/frontend/static/css/grid-view.css @@ -22,14 +22,14 @@ } /* The sheets are hidden in fullscreen, so the grid gets the whole height. */ -html.mobile-sheets:fullscreen #gridViewSwiper, -html.mobile-sheets:-webkit-full-screen #gridViewSwiper { +/* (:is() keeps an unknown prefixed pseudo-class from dropping the rule; see + seek-slider.css.) */ +html.mobile-sheets:is(:fullscreen, :-webkit-full-screen) #gridViewSwiper { height: var(--visible-viewport-height, 100dvh); } /* The badge is hidden in fullscreen (seek-slider.css), so give the row back. */ -:fullscreen #gridViewSwiper, -:-webkit-full-screen #gridViewSwiper { +:is(:fullscreen, :-webkit-full-screen) #gridViewSwiper { --grid-top-reserve: 0px; } diff --git a/photomap/frontend/static/css/mobile-sheets.css b/photomap/frontend/static/css/mobile-sheets.css index 6c0d2124..f685e18a 100644 --- a/photomap/frontend/static/css/mobile-sheets.css +++ b/photomap/frontend/static/css/mobile-sheets.css @@ -87,9 +87,9 @@ outline-offset: -2px; } -/* Hidden with the rest of the controls in fullscreen. */ -html.mobile-sheets:fullscreen .mobile-sheet, -html.mobile-sheets:-webkit-full-screen .mobile-sheet { +/* Hidden with the rest of the controls in fullscreen. (:is() keeps an unknown + prefixed pseudo-class from dropping the rule; see seek-slider.css.) */ +html.mobile-sheets:is(:fullscreen, :-webkit-full-screen) .mobile-sheet { display: none !important; } diff --git a/photomap/frontend/static/css/seek-slider.css b/photomap/frontend/static/css/seek-slider.css index 6ac19553..8c4b3383 100644 --- a/photomap/frontend/static/css/seek-slider.css +++ b/photomap/frontend/static/css/seek-slider.css @@ -118,11 +118,14 @@ flex-direction: column; } +/* Fullscreen selectors go inside :is(), whose selector list is forgiving: a + browser drops just the alternative it does not know there. In a plain + selector list one unknown pseudo-class (Firefox rejects + :-webkit-full-screen, Chromium :-moz-full-screen) throws out the whole rule + (#442). The prefixed form is for Safari before 16.4. */ + /* Hide score display in fullscreen mode */ -:fullscreen .fixed-score-display, -:-webkit-full-screen .fixed-score-display, -:-moz-full-screen .fixed-score-display, -:-ms-fullscreen .fixed-score-display { +:is(:fullscreen, :-webkit-full-screen) .fixed-score-display { display: none !important; }