W3C home > Mailing lists > Public > www-validator-css@w3.org > March 2008

Re: Malformed declarations incorrectly parsed?

From: Yves Lafon <ylafon@w3.org>
Date: Wed, 19 Mar 2008 05:37:46 -0400 (EDT)
To: Benjamin Hawkes-Lewis <bhawkeslewis@googlemail.com>
Cc: www-validator-css@w3.org
Message-ID: <Pine.LNX.4.64.0803190532220.16586@ubzre.j3.bet>

On Wed, 19 Mar 2008, Benjamin Hawkes-Lewis wrote:

> Sorry, but I think you've missed the point of the test case:
>
> p { color:red; color:; color:green }
>
> The problem is not that the validator reports a redefinition of color. The 
> problem is that if you apply the rule:
>
> "Lexical errors are handled with a skip to matching brace"
>
> Then the validator should skip to the matching brace after "color:;", since 
> that is a "lexical error". It should not report any declarations after 
> "color:;" at all, whether they are redefinitions or not.

In fact, the CSS21 text says that a UA must read until the end of a 
declaration, in that case a ';' or a '}' and in doing that, ignore 
matching pairs, like  '{..}'

And that's what the bug fix was about, ignoring matching pairs, while 
previously it was just looking for a ; or }.
HTH,

-- 
Baroula que barouleras, au tiéu toujou t'entourneras.

         ~~Yves
Received on Wednesday, 19 March 2008 09:38:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 June 2012 00:14:20 GMT