Re: [csswg-drafts] [css-color-5] `light-dark()` should resolve at used value time, not computed value time (#13836)

A lazy resolve feature would be generally useful, but would not solve the problem here, because the problem is exactly around this being a footgun that folks can run into without realizing. People see typing the property as a universally Good Thing™, not a tradeoff to be evaluated. And with all the DX improvements we're discussing for `@property`, more and more custom properties are going to be registered.

The system color resolution is unfortunate as well. Looking at #6773 it seems the rationale was people using `color-scheme` in a way that makes colors inaccessible, by setting it on elements without a background. As I demonstrated here, this resolution does not fix the problem, it just shifts it. And people set colors a lot more often than they set `color-scheme`…

Note that system colors also use `light-dark()` for theme switching, fixing this would also fix those. It won't fix things like `AccentColor` though…

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


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

Received on Tuesday, 5 May 2026 14:54:06 UTC