Funkwhale 2.x defines --color-foreground-* and --color-background-* only inside two @scope blocks in fw.css. Firefox ESR 140 has no @scope, so every color: var(--color-foreground-N) was invalid and text fell back to black on the Mocha background. files/compat.js marks such browsers with html.no-css-scope, and catppuccin.css supplies the same positive and negative mappings as plain selectors there. Chromium is unaffected. The API pod now also restarts when the theme changes, because it caches the front's index.html for 15 minutes for the pages it renders itself. Destructive buttons and the old teal count badges get exact Catppuccin colours. Checked with headless Firefox ESR 140 and Chromium against a local copy with test content: nothing below 4.5:1 in dark mode on the home, library, album, artist, profile, search, settings, notifications and admin pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 lines
272 B
JavaScript
5 lines
272 B
JavaScript
// SPDX-License-Identifier: MIT-0
|
|
// Marks browsers without CSS @scope (Firefox ESR 140) so catppuccin.css can
|
|
// supply the colour scales Funkwhale only defines inside @scope blocks.
|
|
if (!('CSSScopeRule' in window)) document.documentElement.classList.add('no-css-scope')
|