fix(player): the Plex player's fills hold on its chrome: an amber head on a white played part
A light theme's accent as a fill on the always-dark chrome was ~2.8:1 (Slate), under the 3:1 a control needs. A native checkbox and slider tint with `accent-chosen` (the accent elsewhere, the media amber under `media-marks`), and so does the skip button's countdown. The progress bar plays white with an amber head: amber there marks a place, as the intro / credits markers do, and an amber played part made a marker ahead of the head read as already played (owner's choice of three).
This commit is contained in:
@@ -2,7 +2,8 @@ import clsx from "clsx";
|
||||
import type { InputHTMLAttributes, ReactNode, Ref } from "react";
|
||||
|
||||
// A6 (docs/DESIGN.md): checkbox, slider and colour well are the BROWSER's controls, tinted
|
||||
// with the accent — keyboard, screen reader and forced-colours support come free, and a drawn copy
|
||||
// with the chosen colour (the accent; the media amber on the player chrome) — keyboard, screen
|
||||
// reader and forced-colours support come free, and a drawn copy
|
||||
// would have to rebuild all three. What the browser does not give is the 44 touch target: the labelled
|
||||
// row (`CheckRow`) or the slider's own box grows to it on a coarse pointer. Like `Input`, a raw
|
||||
// `<input>` for any of them anywhere else is a lint error.
|
||||
@@ -22,7 +23,7 @@ export function Checkbox({
|
||||
type="checkbox"
|
||||
onChange={(e) => onChange?.(e.target.checked)}
|
||||
className={clsx(
|
||||
"size-4 shrink-0 cursor-pointer accent-accent disabled:cursor-not-allowed",
|
||||
"size-4 shrink-0 cursor-pointer accent-chosen disabled:cursor-not-allowed",
|
||||
className,
|
||||
)}
|
||||
{...rest}
|
||||
@@ -70,7 +71,7 @@ export function Slider({
|
||||
type="range"
|
||||
onChange={(e) => onChange(Number(e.target.value))}
|
||||
className={clsx(
|
||||
"min-h-6 w-full cursor-pointer accent-accent pointer-coarse:min-h-(--touch-target)",
|
||||
"min-h-6 w-full cursor-pointer accent-chosen pointer-coarse:min-h-(--touch-target)",
|
||||
className,
|
||||
)}
|
||||
{...rest}
|
||||
|
||||
Reference in New Issue
Block a user