Re: [csswg-drafts] [css-conditional-5] Add ability to test for at-rule preludes (#6966)

The CSS Working Group just discussed `[css-conditional-5] Add ability to test for at-rule preludes`, and agreed to the following:

* ``RESOLVED: Cut down the at-rule test to just `at-rule(@foo)` (no descriptor testing)``

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> kbabbitt: this is about @supports at-rule(...)<br>
&lt;TabAtkins> kbabbitt: resolved to add a few years ago<br>
&lt;TabAtkins> kbabbitt: discussion in this issue to expand the resolution...<br>
&lt;TabAtkins> kbabbitt: previous we resolved to just test at-rule name, or at-rule name + descriptor value<br>
&lt;TabAtkins> kbabbitt: original proposal was to let you test an entire at-rule<br>
&lt;fantasai> s/Topic/Subtopic/<br>
&lt;TabAtkins> kbabbitt: we just resolved to change that<br>
&lt;TabAtkins> kbabbitt: to do it with the new custom thing<br>
&lt;TabAtkins> kbabbitt: But being able to test for just a simple name is useful, much simpler for an easy check<br>
&lt;noamr> q+<br>
&lt;TabAtkins> kbabbitt: Versus writing out the entire rule<br>
&lt;lea> +1<br>
&lt;andruud> +1<br>
&lt;astearns> ack noamr<br>
&lt;TabAtkins> kbabbitt: So based on the resolution from earlier, i propose we scale at-rule() back to just allow an at-rule name, and let descriptors be handled by the rest<br>
&lt;TabAtkins> noamr: at-rule name is boudn to be foot-gunny, you could test the name expecting the "modern" version of an at-rule, but a browser only supports an older version<br>
&lt;TabAtkins> lea: that's why we have the more elaborate syntax<br>
&lt;TabAtkins> noamr: yeah, but for a plain name, you just rely on the browser having a list of at-rules<br>
&lt;lea> it _is_ the same argument where we resolved against doing this for bare properties<br>
&lt;TabAtkins> noamr: and you hope that list matches everything you actually want to do<br>
&lt;lea> q+<br>
&lt;TabAtkins> it's not, i'll q+<br>
&lt;TabAtkins> q+<br>
&lt;lea> q-<br>
&lt;lea> q+<br>
&lt;TabAtkins> noamr: so if we add something to @font-face, your at-rule(@font-face) test might not be useful<br>
&lt;TabAtkins> noamr: not necessarily a reason not to do it, just to consider<br>
&lt;astearns> ack TabAtkins<br>
&lt;lea> TabAtkins: Lea will say this is the same argument we use to test a bare property name<br>
&lt;lea> TabAtkins: it is broadly the same, but different in particulars<br>
&lt;lea> TabAtkins: specifically, we change properties a lot more than @rules, we add new values constantly<br>
&lt;lea> TabAtkins: we change @rules sometimes, but not all the time<br>
&lt;lea> TabAtkins: so naming is more stable for @rules<br>
&lt;lea> TabAtkins: test property + value is not much to type, usually<br>
&lt;lea> TabAtkins: typing a whole @rule to test the existence of something is a large burden<br>
&lt;lea> TabAtkins: amount of work is different, so shortcut is worth it<br>
&lt;lea> noamr: not an objection, just to make sure we considered this<br>
&lt;astearns> ack lea<br>
&lt;TabAtkins> lea: I was going to say this is basically the same argument that we decided against testing bar eproeprties<br>
&lt;TabAtkins> lea: bc we were worried about changing the syntax of proeprties causing authors to make bad assumptions<br>
&lt;TabAtkins> lea: i do agree with tab's argument abou tnot needing the indirection of a custom supports<br>
&lt;TabAtkins> lea: But I also think we should allow testing against bare properties<br>
&lt;TabAtkins> lea: This also creates footguns because authors might test for the wrong thing<br>
&lt;TabAtkins> lea: but i definitely don't object to still ahving the at-rule() shortcut<br>
&lt;TabAtkins> astearns: other comments?<br>
&lt;TabAtkins> lea: I wonder if we could harmonize the syntax<br>
&lt;lea> `@supports (@foo)`<br>
&lt;lea> `@support at(foo)`<br>
&lt;TabAtkins> astearns: I'd object to the bare parens like that, i want more meaning<br>
&lt;TabAtkins> TabAtkins: At that point we might as well jsut use the full at-rule() name, and we need the @, as it's part of the name<br>
&lt;TabAtkins> TabAtkins: as proposed in the issue<br>
&lt;TabAtkins> astearns: objections to reoslving on that?<br>
&lt;TabAtkins> RESOLVED: Cut down the at-rule test to just `at-rule(@foo)` (no descriptor testing)<br>
&lt;bramus> Woohoow!<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6966#issuecomment-3205037703 using your GitHub account


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

Received on Wednesday, 20 August 2025 09:13:15 UTC