Re: [CSS2.1] blocks with missing end bracket and parsing error

* Alan Gresley wrote:
>This is a bug that I discovered tonight after a post on CSS discuss (my 
>replies have to turned up yet).
>
><http://css-class.com/test/css21testsuite/blocks-031.xht>
>
>What I found interesting is that in IE8 and IE9, the remainder of the 
>style-sheet is thrown out. The pertinent CSS is this.
>
>    p [ background: red }
>    .test1 { background: green }
>    .test2 { background: green }

Some time ago the CSS Working Group decided to change slash clarify the
specification to require {[()]} matching when parsing selectors. Since
all "open constructs" close when hitting the end of the style sheet this
is parsed as `p [ ... ]` which is invalid and thus ignored. See the
rules in http://www.w3.org/TR/CSS21/syndata.html#parsing-errors for the
cases "Malformed statements" and "Unexpected end of style sheet".
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Friday, 25 March 2011 06:50:45 UTC