[csswg-drafts] [mediaqueries-5] Where does @custom-media fit into CSS's existing grammar?

cvrebert has just created a new issue for https://github.com/w3c/csswg-drafts:

== [mediaqueries-5] Where does @custom-media fit into CSS's existing grammar? ==
Spec: https://drafts.csswg.org/mediaqueries-5/#custom-mq

The spec defines an [*`@custom-media`*](https://drafts.csswg.org/mediaqueries-5/#at-ruledef-custom-media) grammar production, but it doesn't seem to state where this rule fits into the existing grammar of CSS.

For comparison, the `@supports` rule's spec specifically addressed this in [its "Grammar" section](https://www.w3.org/TR/css3-conditional/#grammar):
> In order to allow these new @-rules in CSS style sheets, this specification modifies the `stylesheet` production in the Appendix G grammar of [CSS21] by replacing the `media` production defined in [CSS21] with the `media` production defined in this one, and additionally inserting `| supports_rule` alongside `ruleset | media | page`.

Such a statement for *`@custom-media`* would also clarify whether nesting it inside `@`-rules is legal. E.g.
```css
@media (min-width: 500px) {
    @custom-media --my-mq (min-width: 10px);
}
```

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1512 using your GitHub account

Received on Thursday, 8 June 2017 21:46:35 UTC