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: Florian Rivoal via GitHub <sysbot+gh@w3.org>
Date: Wed, 30 Sep 2020 16:29:28 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-701501677-1601483367-sysbot+gh@w3.org>
On the call, @fantasai 's proposal from #5544 (which I'll call option C) has been described as even less prescriptive and less interoperable than B, but I would disagree with that characterization.

B tells you that the first color in the list is the primary accent, the second one is the contrasting accent, and so on, but it doesn't tell you what that means, nor how to deal with controls being differently structured from one browsers to another (giving you these details would be A). Still, it tells you that the first color goes to the primary accent, and is inflexible about that. What part of the control gets a primary accent may change per platform / control / etc, but it does not depend on the specific colors provided.

C isn't less prescriptive, it's differently prescriptive. Which ever part(s) of the control is colored on that platformwill be accented, picking from the list of colors provided, but the UA is not bound to use the first in the list for the primary accent. Instead, it is required to use the color from the list which has the best contrast with whatever it is it will be contrasting again. This should make it more interoperable: to the extent controls are structured the same, the same color will end up being picked, and when they're not, you're at least guaranteed good contrast.


Noticing @tabatkins 's https://github.com/w3c/csswg-drafts/issues/5480#issuecomment-701498538 comment just before I post: that's a bummer. I wonder if there's a middle way. Could it indeed be expressed as a combination of accent and background, as https://github.com/w3c/csswg-drafts/issues/5480#issuecomment-701500321 suggests? That feels doable for the UA stylesheet, which can assume what the structure of the control would be, but I'm less sure authors could reliably do that without that knowledge.

GitHub Notification of comment by frivoal
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5480#issuecomment-701501677 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 16:29:30 UTC

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