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

Re: how should this invalid CSS be parsed?

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sat, 03 Nov 2007 23:09:36 -0500
Message-ID: <472D4600.4040103@mit.edu>
To: Christof Hoeke <csad7@t-online.de>
CC: www-style@w3.org

Christof Hoeke wrote:
> I have the following CSS
> 
>     a {x:1}
>     }
>     b{y:2}
>     c{z:3}
> 
> The specification says (as I remember) that if an error is found it is 
> resolved with the next valid block.

Yes.

> So I thought the CSS above should be equivalent to:
> 
>     a {x:1}
>     c{z:3}

Yes.

> Browsers on the other hand seem to simple remove the "}" and the CSS 
> would be equivalent to

Which "browsers" would that be?  I just Opera 9, Gecko (1.9 alpha, but this 
behavior hasn't changed since at least 1.7), and khtml (Konqueror 3.5.3, but I'd 
be willing to bet they haven't changed this since) and they all do what you 
thought they should.

-Boris
Received on Sunday, 4 November 2007 04:09:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:56 GMT