On 26 April 2016 at 14:40, <
ro...@medvedi.eu> wrote:
> Hi dev-mdc,
>
> The MDN page about CSS at-rule says that at-rule is
>
> > "outside of a CSS block, or at the end of the first block."
>
> (This is present since page creation:
>
https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule$revision/4435)
>
> I was wondering where this comes from. And I believe it is either wrong,
> misleading, or outdated.
>
> In the CSS 2.1 spec (
https://www.w3.org/TR/CSS21/syndata.html#at-rules)
> it only sets some limitations on '@import' rule.
>
I agree, the text was confusing and incorrect. I've changed it now
according to the text in the CSS 2.1 specification.
> In (not normative) Description of CSS's Syntax of CSS Syntax Module Level
> 3 (
https://www.w3.org/TR/css-syntax-3/#syntax-description) it even says
> about at-rule's body blocks that
>
> > "they may contain additional blocks, or at-rules, or other structures
> altogether."
>
> In another part in the aforementioned specification is a (not normative)
> railroad diagram of Declaration list (
>
https://www.w3.org/TR/css-syntax-3/#declaration-list-diagram) which--to
> my understanding--allows at-rules inside declaration block.
>
Yes, at-rules are allowed within declaration lists, i.e. also within other
at-rules. An example for this is @font-feature-values.
Sebastian