Re: [csswg-drafts] Allow specifying the "accent color" of a form control element (#5187)

I wanted to address two very good points made by @hober in the last CSSWG [meeting](https://github.com/w3c/csswg-drafts/issues/5187#issuecomment-676546952) (paraphrasing):
 1. What about the radio button? For example, current Chrome uses a larger central blue "dot" while most other browsers use a white "dot" on a blue (or other color) background. Shouldn't those both be `accent-color: blue`?
 2. What about controls that use gradients? What happens to those when `accent-color` is used?

For question 1, I would say that in the interest of interop, Chrome would likely remove the blue border, and color the outside (background) with the "primary" accent color, and the larger central "dot" with the "contrasting" accent color. I.e. `accent-color: blue` would effectively invert the default appearance of Chrome's radio button. And that's ok - the developer's intention there is to get all of the radio buttons to look (at least color-wise) the same. Yes, that's a different appearance than the full `auto` radio button, but when `accent-color` computes to something other than `auto`, the developer is indicating what they'd prefer.

Question 2 is also interesting. In the [new section](https://github.com/mfreed7/accent-color/blob/master/proposal.md#existing-control-examples) of the proposal, examples with gradients can be seen under the "Aqua" and "Snow Leopard" rows for many controls. (No modern implementations seem to use gradients, that I could find.) There are a number of ways to deal with that, I think. One is to just notice that the gradients go from darker blue to lighter blue, and if `accent-color: green` is specified, replace the gradient with a dark-green to light-green gradient. The other way, which I think I'd prefer, is that if `accent-color` computes to something other than `auto`, replace the gradient with a solid-color fill of the specified color. Again here, the developer is indicating that they'd like a particular color - let's respect it.


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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 20 August 2020 16:38:44 UTC