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

Re: Malformed declarations incorrectly parsed?

From: Yves Lafon <ylafon@w3.org>
Date: Tue, 18 Mar 2008 03:18:01 -0400 (EDT)
To: Benjamin Hawkes-Lewis <bhawkeslewis@googlemail.com>
Cc: www-validator-css@w3.org
Message-ID: <Pine.LNX.4.64.0803180313320.12312@ubzre.j3.bet>

On Tue, 18 Mar 2008, Benjamin Hawkes-Lewis wrote:

> Hmm. I tried this with the very same example and it still extracts:
> p {
> color : red;
> color : green;
> }
> Does that not happen for you?

Yes, but it's normal.
The spec says that it is "equivalent"  to p { color: green } and it is, 
because of the cascading rules. If you turn the warnings on, you will have 
a "redefinition warning" in that case, and in the end, it is equivalent to 
p { color: green }.

In http://www.w3.org/TR/CSS21/syndata.html#parsing-errors
section "Unexpected end of string.", there is also an examples that lead 
to a p { color: green ; color: green }

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

Received on Tuesday, 18 March 2008 07:18:34 GMT

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