W3C home > Mailing lists > Public > www-style@w3.org > December 2002

Re: CSS parser recovery

From: Etan Wexler <ewexler@stickdog.com>
Date: Wed, 25 Dec 2002 04:42:27 -0500
Message-ID: <1910393820.20021225044227@stickdog.com>
To: (wrong string) Çelik <tantek@cs.stanford.edu>, Ian Hickson <ian@hixie.ch>
Cc: "L. David Baron" <dbaron@fas.harvard.edu>

Tantek Çelik wrote to <www-style@w3.org> on 23 December 2002 in "CSS
parser recovery" (<mid:BA204E97.1BB22%25tantek@cs.stanford.edu>):

> On 12/14/02 2:01 AM, "Ian Hickson" <ian@hixie.ch> wrote:

>> [...] You have not shown any part of the spec that says that the
>> brace should be ignored,

> It causes the declaration to become illegal (per the property : value
> definition of declaration), and thus the declaration is ignored.

I must disagree.  I reproduce the example in question for ease of

p {color: green; /* missing "}" */
q {color: blue;}
samp {color:red;}

The second left curly bracket (U+007B) does not fit into CSS syntax,
not even in the core grammar.  We can ignore a declaration as invalid
only if we can parse it as a declaration in the first place.  Parsing
as a declaration means following the 'declaration' production in the
core grammar.  The string "q " makes a fine start on that production,
matching the 'property' production.     

Then the left curly bracket ruins everything.

The example does not match the core grammar and so the example is not
CSS and so user agents are free to exhibit any behavior regarding the

Etan Wexler <mailto:ewexler@stickdog.com>
Received on Wednesday, 25 December 2002 05:35:01 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:04 UTC