fix(player): a chosen tab's underline and an open or pressed icon read the scope's chosen colour
The underline named `--color-chosen`, which is resolved once on :root, so it stayed the accent under `media-marks` (seen in the browser: fuchsia on Slate light); it reads `--chosen` where it is used now. An icon button pressed or with its menu open tinted its glyph with the accent; it takes the chosen colour — the accent everywhere but the player chrome, where it is the media amber.
This commit is contained in:
@@ -93,6 +93,15 @@ describe("the media colours", () => {
|
||||
// The tick of a chosen row reads the chosen colour, so a scope can name its own.
|
||||
const check = readFileSync(new URL("../components/ui/MenuCheck.tsx", import.meta.url), "utf8");
|
||||
expect(check).toMatch(/\btext-chosen\b/);
|
||||
// So does an icon button that is on or has its menu open (the player's track menu button).
|
||||
const buttons = readFileSync(
|
||||
new URL("../components/ui/buttonStyles.ts", import.meta.url),
|
||||
"utf8",
|
||||
);
|
||||
expect(buttons).toMatch(/aria-pressed:text-chosen/);
|
||||
expect(buttons).toMatch(/aria-expanded:text-chosen/);
|
||||
// (A pressed FILLED button keeps the accent fill under its own `text-accent-fg`.)
|
||||
expect(buttons).not.toMatch(/aria-(pressed|expanded):text-accent(?!-)/);
|
||||
// The player's own components are chrome throughout: nothing chosen there is the accent's text
|
||||
// (a light theme's accent is dark on it — Slate 2.84:1).
|
||||
for (const f of ["PlexPlayer.tsx", "PlexPlayerSettings.tsx", "UpNextCard.tsx"]) {
|
||||
|
||||
Reference in New Issue
Block a user