Re: [csswg-drafts] [css-values-5] Using `if()` to do dark/light switching of image urls. (#10577)

> why not `calc( color-scheme(dark)? blue: cyan )`

because `calc` returns a dimension (i.e. a number with an optional unit), not an arbitrary type.
And `calc` does not support a ternary operator either. The `if()` function has already been settled previously (the topic of this issue is just the `color-scheme()` condition, not the whole existence of the `if` function).

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


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

Received on Friday, 26 September 2025 09:28:29 UTC