[csswg-drafts] [css-color] Add a function to allow authors to specify colors reacting to `color-scheme` (#7561)

emilio has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-color] Add a function to allow authors to specify colors reacting to `color-scheme` ==
Some UIs require rendering a light button in some places, but dark in another. It'd be nice if you could switch between these by using `color-scheme`, like you can with native widgets. However, right now there's no way to do this other than exclusively using system colors.

Chromium has `-internal-light-dark(<light-color>, <dark-color>)` for this. However `color-scheme` was designed a bit more generically than `light` / `dark`, so maybe we need a `schemed-color(<custom-ident> <color>, <fallback-color>)` or so, where the `<custom-ident>` is the scheme name, and the `<color>` is the color for that scheme. So `-internal-light-dark(red, blue)` would become `schemed-color(light red, blue)` or so.

This would allow authors to create widgets that properly react to `color-scheme`.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7561 using your GitHub account


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

Received on Tuesday, 2 August 2022 21:46:08 UTC