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

On Mar 26, 2011, at 6:19 AM, Boris Zbarsky wrote:

> On 3/25/11 2:50 AM, Bjoern Hoehrmann wrote:
>> * Alan Gresley wrote:
>>> 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.
> 
> Indeed.  This will be fixed in Gecko 2.2 as well, for what it's worth [1].
> 
> -Boris
> 
> [1] https://bugzilla.mozilla.org/show_bug.cgi?id=616137

Testing with a very recent hourly Minefield build [1], shouldn't the second block in the test case [2] have a green background ? Both blocks have a blue background.

The CSS validator tells me that the following is the valid part of the stylesheet:

p {
background : blue;
color : white;
}
.test2 {
background : green;
}

[1] @ http://hg.mozilla.org/mozilla-central/rev/132e89233cfa
[2] http://css-class.com/test/css21testsuite/blocks-031.xht

Received on Saturday, 26 March 2011 00:58:11 UTC