Repository navigation
fix(clone): paint accent-color: auto stand-ins in the system accent and draw them closer to the native controls - #561
Merged
Conversation
…umerlab#560) The drawn checkbox, radio and slider took the control's text colour for `accent-color: auto`. On a dark page that is near white, so a checked box came out light under a white tick. `auto` is the UA's own accent, which CSS names AccentColor, with AccentColorText for the mark on it. Both resolve inside the capture to what the page resolves them to. An unchecked `auto` control keeps the text colour as its outline. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Four states of the drawn checkbox and radio that the live control shows differently: - A disabled control is grey whatever its accent. - A checkbox that is checked and indeterminate shows the dash, not a tick. - The tick and the dot on an authored accent are white or black by contrast. - An unchecked control shows none of its accent. Co-Authored-By: Claude Fable 5.2 <[email protected]>
… ones Measured against Firefox 160 and Chrome 157. - An indeterminate box is filled like a checked one, with the dash in the mark colour. - An unchecked control is a 1px hairline around the Field colour. - The tick grows with the box, about an eighth of it thick, and keeps clear of the edges. - A checked radio is Firefox's: the accent to the edge, with a ring of the mark colour set in. The stand-in's svg now carries the control's colour scheme. The capture's base rule for <svg> resets color-scheme, so the system colours resolved as on a light page whatever the page's scheme. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Chromium paints `auto` controls #99c8ff on a dark page, not its AccentColor. Firefox's slider thumb is grey, whatever the accent. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Member
|
Thank you! Merging now! |
tinchox5
approved these changes
Nov 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #560.
The drawn checkbox, radio and slider took the control's text colour for
accent-color: auto. On a dark page that is near white, so a checked box came out as a light box under a white tick. This PR paintsautoin the UA's own accent, then fixes the other differences from the native controls that showed up while comparing the two.Changes, by commit
auto(Firefox: checkbox stand-in uses the text colour for accent-color: auto, so dark pages get a white box with a white tick #560).autois painted inAccentColor, withAccentColorTextfor the mark on it.Fieldcolour.<svg>now carries the control's colour scheme. The capture's base rule for<svg>resetscolor-scheme, so system colours in the stand-in resolved as on a light page whatever the page's scheme.autocontrols#99c8ffunder aField-coloured mark, while itsAccentColorstays#0075ff. The indeterminate box takes those there.Target, before, after
Each strip is the same ten controls. Target is a screenshot of the live page, Before is a capture with
main(e4a8303), and After is a capture with this branch. Windows 11, with a red system accent.Firefox 160 (Zen 1.24.1b)
Firefox takes the stand-in for every checkbox, radio and slider.
Chrome 157
Chromium keeps its native controls and takes the stand-in only for an indeterminate checkbox, so only the third and fourth controls change. Edge 157 gave the same images as Chrome, byte for byte.
Testing
npm run checkpasses.core.clone.more,core.clone.nativeControls,core.clone.indeterminate,snapdom.issue516andsnapdom.issue494.Notes for review
colorToRgbainsrc/modules/styles.jsis now exported, for the contrast check.#99c8ffis hard-coded for Chromium's dark scheme. Chrome paintsAccentColorinside the capture only as the whole value of an attribute, not insidelight-dark(), so the scheme is settled when the control is drawn. I measured it in Chrome and Edge on Windows only.🤖 Generated with Claude Code