- labels: --> Syntax
At-rules start with an at-keyword, an '@' character
followed immediately by an identifier (for
example, '@import', '@page').
An at-rule consists of everything up to and including the
next semicolon (;) or the next block, whichever comes
first. A CSS user agent that encounters an
unrecognized at-rule must ignore the whole of the at-rule
and continue parsing after it.
CSS2 user agents must ignore any '@import' rule that
occurs inside a block or that doesn't precede all rule
sets.
Illegal example(s):
Assume, for example, that a CSS2 parser encounters
this style sheet:
@import "subs.css";
H1 { color: blue }
@import "list.css";
The second '@import' is illegal according to CSS2. The
CSS2 parser ignores the whole at-rule, effectively
reducing the style sheet to:
@import "subs.css";
H1 { color: blue }
Illegal example(s):
In the following example, the second '@import' rule is
invalid, since it occurs inside a '@media' block.
@import "subs.css";
@media print {
@import "print-main.css";
BODY { font-size: 10pt }
}
H1 {color: blue }