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

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

From: Mason Freed via GitHub <sysbot+gh@w3.org>
Date: Sat, 20 Jun 2020 00:19:24 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-646904784-1592612363-sysbot+gh@w3.org>
> Is there a reason this can't be done via `color` alone? Would that currently break the modern OS appearance of the control?

I think the biggest downside to re-using `color` in this way is that it is non-specific. It would not allow you to, for example, change the text color to one thing, and the "accent" features to something else. Take, for example, the date picker:

<input type=date style="color: red">

which has a text display of the date, and (on some platforms) a picker icon or arrow. If we tie everything to `color`, the above `<input>` would have **both** red text **and** a red icon. In contrast, `accent-color` would be specific to just the "accents", allowing black text with a red picker icon, for example:

<input type=date style="color: black; accent-color: red;">

This would also be compatible with the existing Mac concept of an "Accent color", which affects control elements but **not** text colors. It would also be safe for web compat, since `accent-color` is a new CSS property.

GitHub Notification of comment by mfreed7
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5187#issuecomment-646904784 using your GitHub account
Received on Saturday, 20 June 2020 00:19:26 UTC

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