Skip to content

Make the fullscreen CSS rules apply in every browser - #443

Merged
lstein merged 1 commit into
masterfrom
lstein/fix/fullscreen-badge-hide
Nov 16, 2026
Merged

lstein merged 1 commit into
masterfrom
lstein/fix/fullscreen-badge-hide

Conversation

@lstein

@lstein lstein commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Fixes #442.

Summary

Every fullscreen rule listed :fullscreen beside prefixed forms in a plain selector list. One unknown pseudo-class invalidates the whole rule, and each browser rejects one of them, so these rules were dead:

Rule Chromium Firefox
seek-slider.css: hide the album badge (:-moz-full-screen, :-ms-fullscreen listed) dropped dropped
grid-view.css: grid top reserve → 0 ok dropped (Firefox rejects :-webkit-full-screen)
grid-view.css: phone grid full height ok dropped
mobile-sheets.css: hide the phone sheets ok dropped

The alternatives now go inside :is(), whose selector list is forgiving: a browser drops only the alternative it doesn't know. :is() keeps the specificity of a single pseudo-class, as before. :-webkit-full-screen stays for Safari before 16.4. -moz/-ms are gone (Firefox has supported unprefixed :fullscreen since 64; -ms- was IE/old Edge, which we redirect to the unsupported-browser page).

Visible change: in fullscreen the album badge is now hidden in Chrome and Firefox, as the rule always intended. The JS already assumed it could be hidden: the metadata drawer falls back to a fixed top, and the slider/strip re-anchor at the left edge on the fullscreen resize.

Test plan

  • Parsed each stylesheet into headless Chromium and Firefox (Playwright 1.63): before, the rules listed above are missing from cssRules; after, all are present in both.
  • Real app, desktop, both browsers: badge display flex → none in fullscreen → flex after exit; --grid-top-reserve 0px in fullscreen.
  • Phone layout in Chromium: both sheets hidden in fullscreen. (Headless Firefox resizes the window to 1366×768 on fullscreen, leaving the phone layout, so this was checked with an isolated page using the same selector form.)
  • npm test (1141 pass)
  • Safari / iPad fullscreen (WebKit can't launch on the dev host)

Note for #441: that branch adds more :fullscreen, :-webkit-full-screen pairs; it will be converted to the :is() form when rebased onto this.

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
@lstein
lstein enabled auto-merge (squash) November 16, 2026 03:28
@lstein
lstein disabled auto-merge November 16, 2026 03:31
@lstein
lstein merged commit 1beb19d into master Nov 16, 2026
10 checks passed
@lstein
lstein deleted the lstein/fix/fullscreen-badge-hide branch November 16, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Album badge is not hidden in fullscreen: invalid vendor selectors drop the whole CSS rule

1 participant