Re: [csswg-drafts] [css-ui-4] Authors should have access to accent-color value to use in their code (#5900)

> Why is custom accent-color special vs. e.g. custom background-color or custom any-other-color? Do we expect it to be as prevalent as `currentColor`? I honestly doubt so.

One difference between the current background color and the current accent color is that an accent color is likely to be used in a wider variety of ways – it could be needed as the background, border, text color, text selection color, outline, etc. A background color is not as likely to have as many uses. It would likely be needed to be reused as a background color, but `inherit` could meet that use case.

> Components that want to support custom accent colors could do something like `var(--accent-color, NativeAccentColor)` instead, or what not.

This would work, if the component author could be sure that the page author has defined a custom property `--accent-color` somewhere in their code. But usually the component author and page author are different people.

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


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

Received on Thursday, 21 October 2021 14:12:54 UTC