W3C home > Mailing lists > Public > public-css-archive@w3.org > September 2020

Re: [csswg-drafts] [css-ui] Should interoperability be a goal for the `accent-color` spec? (#5480)

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Wed, 30 Sep 2020 18:57:50 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-701581116-1601492269-sysbot+gh@w3.org>
Ah, and Elika explained her #5544 suggestion better to me. Her idea is that the UA already knows what colors its going to be working with (generally, starting with the 'color' and 'background-color' values) and then adds in some "accent colors" of its own, which become controllable via this property. (For Chrome's UA stylesheet, `accent-color: blue`, basically.)

In any given instance of the UI, the UA knows how it's going to be displaying the colors against each other, and thus knows what colors need to contrast against each other. It can thus determine whether the provided accent color is adequate in the given situation or not, and if not, can switch to a "fallback" accent-color (from fantasai's suggestion), or if nothing works, can tweak or ignore the given accent color to work, as a last resort.

So in Chrome's case, an unchecked checkbox would just use the 'background-color' (and perhaps 'color' for the border?), while a checked checkbox would use the 'accent-color' for the bg and the 'background-color' for the check. If it determines that those two colors, as provided by the author, don't contrast sufficiently, it can fallback to a second 'accent-color' specified, or adjust the specified accent-color lighter/darker, or ignore it and use the default, as desired by the UA.

GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5480#issuecomment-701581116 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 30 September 2020 18:57:52 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:17 UTC