Re: how should this invalid CSS be parsed?

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 UTC