- From: L. David Baron via GitHub <noreply@w3.org>
- Date: Mon, 06 Oct 2025 18:16:37 +0000
- To: public-css-archive@w3.org
dbaron has just created a new issue for https://github.com/w3c/csswg-drafts: == Should common @when and if() functions be the same? == The [`@when` rule](https://drafts.csswg.org/css-conditional-5/#at-ruledef-when) defines `media()` and `supports()` functions. The [`if()` function](https://drafts.csswg.org/css-values-5/#if-notation) defines `supports()`, `media()` and `style()` functions. I understand (I think) that `style()` is only present for `if()` because if is in a value context, so style queries are possible, whereas `@when` is in a rule context. (But see [container queries](https://drafts.csswg.org/css-conditional-5/#container-queries)! Though I think those impose additional constraints which may be a good reason to keep them out of `@when`.) However, I'm curious why there are differences in the definitions of the `supports()` and `media()` functions between these contexts. I'd initially expect them to be the same, although maybe there are good reasons for them to be different. (If so, it would be good to document them.) Should these functions basically be the same? Should they even have a common definition (which other types of conditions may add to in the future)? (It's not clear to me that any of the current differences are substantive... but they're definitely defined in different ways right now.) Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12903 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 6 October 2025 18:16:38 UTC