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

Tagging for discussion at the upcoming F2F.

I've published an explainer detailing Tab's proposal at the top of this issue and answering the open questions: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/AtRuleFeatureDetection/explainer.md

The biggest open question I saw in the previous discussion of this issue was what to do with unrecognized media features, since they are accepted by the MQ grammar but can't return a meaningful answer. The explainer proposes that they should return false from a feature query. I use the term "forgiving catch-all grammar" in the explainer, which we can bikeshed. In the context of MQs it means `<general-enclosed>`, but perhaps there's different cases in other grammars that we'd want to treat similarly.

The explainer also proposes answers to the linked sub-issues:
- `@import` is testable but `@charset` is not since the latter is not an at-rule.
- Nested at-rules can be tested either standalone by name or in context.
- Any declaration, either a descriptor or a property, can be tested in the third form.


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


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

Received on Monday, 4 August 2025 16:35:53 UTC