W3C home > Mailing lists > Public > www-style@w3.org > November 2013

[CSS21] Errata for at-rules in declaration lists

From: Simon Sapin <simon.sapin@exyr.org>
Date: Mon, 11 Nov 2013 18:29:01 +0800
Message-ID: <5280B16D.8070700@exyr.org>
To: Bert Bos <bert@w3.org>, www-style <www-style@w3.org>
Hi Bert,

Please find below an additional CSS 2.1 errata entry for the changes 
described in [1] and resolved by the WG in [2].

[1] http://lists.w3.org/Archives/Public/www-style/2013Apr/0506.html
[2] http://lists.w3.org/Archives/Public/www-style/2013May/0783.html

In §4.1.1 Tokenization, in the grammar, the ruleset is changed to:

     ruleset: selector? '{' S* declaration-list '}' S*;

And a declaration-list production is added:

         : declaration [ ';' S* declaration-list ]?
         | at-rule declaration-list
         | /* empty */

(Note: this is using recursion rather than repetition to avoid unbounded 

In §4.1.7 Rule sets, declaration blocks, and selectors:

> In between there must be a list of zero or more semicolon-separated
> (;) declarations.

Replace the above with:

> In between there must be a list of zero or more declarations and
> at-rules. Declarations must end with a semicolon (;) unless they’re
> last in the list.
> Note: CSS level 2 has no at-rules that may appear inside rule sets,
> but such at-rules may be defined in future levels.

(The first part is a bit awkward. Feel free to rephrase.)

In §4.2 Rules for handling parsing errors, in the "Malformed 
declarations" list item, add:

> When the UA expects the start of a declaration or at-rule (i.e., an
> IDENT token or an ATKEYWORD token) but finds an unexpected token
> instead, that token is considered to be the first token of a
> malformed declaration. I.e., the rule for malformed declarations,
> rather than malformed statements is used to determine which tokens to
> ignore in that case.

… and remove the paragraph that had that same text in §13.2 Page boxes: 
the @page rule. (ie. @page is not a special case anymore.)

Change the first example "p { color:green }" to be
"p { @foo { bar: baz } color:green }"

Simon Sapin
Received on Monday, 11 November 2013 10:29:28 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:36 UTC