W3C home > Mailing lists > Public > www-style@w3.org > March 2011

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

From: Philippe Wittenbergh <ph.wittenbergh@l-c-n.com>
Date: Sat, 26 Mar 2011 09:57:39 +0900
Cc: Bjoern Hoehrmann <derhoermi@gmx.net>, Alan Gresley <alan@css-class.com>, CSS 3 W3C Group <www-style@w3.org>
Message-Id: <65F89376-628B-45AB-9B6E-5E4D15EA8F5F@l-c-n.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>

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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:38 GMT