Re: [csswg-drafts] [css-color-5] Support `light-dark(<color>, <image>)` by producing a dimensionless image for `<color>` (#13724)

From a language-design perspective, I would prefer not to make `light-dark()` the sole image function that auto-synthesizes a solid-color image for you. It also seems slightly odd that a color argument will *either* turn into a color *or* an image based on the value of the other argument. (In particular, since you can nest `light-dark()`, you'll need to look further in, rather than just basing that on the function name of the argument.) I also think it's not super clear that `light-dark(none, blue)` would generate an image rather than a color. (Today, it would just be invalid.)

We already have one (weird, slightly accidental) way to create a solid-color image, and another *intended* way to do so that's clear to read and has been in specs for a long time. The more we do implicitly the harder it often becomes to reason about, imo.

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


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

Received on Wednesday, 25 March 2026 18:23:45 UTC