wrolpi/app/src/themes
Roland e15e2fd993
ui: a range slider is painted by the theme, not by the browser
A native `<input type="range">` is drawn by the UA, and with nothing said about
it the UA uses its own accent -- a fixed blue no theme can reach.  Five are on
screen: the log level on Settings, and the duration sliders in the food, water
and ration calculators.  None had ever been themed; `accent-color` appeared
nowhere in the app.

Night is where that is not merely inconsistent.  The theme exists so a user
reading in the dark keeps their adaptation and every token is a red, so the
slider was the brightest non-red thing on the page -- on the one control a user
drags back and forth while watching it.

`accent-color: var(--blue)` for the same reason links take that token: it
remaps per theme, so night gets the dim red (#8a2828) and amber the amber
(#a86618) with no second rule.  Checkboxes, radios and `<progress>` are
included because they are painted from the same accent and would have been the
next report.

`accent-color` reaches the thumb and the FILLED half of the track and nothing
else, so on a dark ground the rest stayed the UA's pale slab.  `color-scheme:
dark` fixes that, scoped to these controls rather than declared on `html` --
on `html` it also governs scrollbars, spinners and every other piece of browser
chrome, which is a larger change than this one and worth making deliberately.

Tests assert the accent equals `--blue` in each of the four themes, plus a
negative: in the monochrome themes it is a resolved color and never `auto`.
Without that second one the first four would also pass on an unstyled slider
whose accent happened to stringify the same way.

Added to the gallery, which is how the monochrome themes get looked at.  Its
slider is stateful and starts mid-track: the accent only shows on the filled
half, so one parked at either end would show almost none of the color the
section exists to check.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-08 18:05:54 -06:00
..
contrast.ts style: spell it "color" everywhere 2026-08-08 18:05:50 -06:00
fonts.css ui: theme tokens and a four-theme runtime 2026-08-08 18:03:00 -06:00
mantine.ts ui: the last of Semantic UI, in name and in dead CSS 2026-08-08 18:05:54 -06:00
map-flavor.test.js style: spell it "color" everywhere 2026-08-08 18:05:50 -06:00
MediaFilterDefs.tsx ui: media filtering is a per-theme setting, not a night-mode hardcode 2026-08-08 18:04:00 -06:00
names.ts ui: the last of Semantic UI, in name and in dead CSS 2026-08-08 18:05:54 -06:00
navColors.test.js ui: the last of Semantic UI, in name and in dead CSS 2026-08-08 18:05:54 -06:00
navColors.ts ui: the last of Semantic UI, in name and in dead CSS 2026-08-08 18:05:54 -06:00
tokens.css ui: a range slider is painted by the theme, not by the browser 2026-08-08 18:05:54 -06:00
tokens.test.js ui: a browser layer for the library, and the .media reset that never applied 2026-08-08 18:04:04 -06:00
ui-scale.test.js ui: the last of Semantic UI, in name and in dead CSS 2026-08-08 18:05:54 -06:00