- From: Alan Gresley <alan@css-class.com>
- Date: Sat, 26 Mar 2011 13:31:10 +1100
- To: Philippe Wittenbergh <ph.wittenbergh@l-c-n.com>
- CC: Boris Zbarsky <bzbarsky@MIT.EDU>, Bjoern Hoehrmann <derhoermi@gmx.net>, CSS 3 W3C Group <www-style@w3.org>
On 26/03/2011 11:57 AM, Philippe Wittenbergh wrote: > > 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. Is this what you see in Minefield? This is also what IE8 and IE9 does. > 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 (The above test case has be changed, background colors) I have a simpler test cases that shows the same behavior. <http://css-class.com/test/css21testsuite/blocks-036.xht> The CSS is this. [ .test1 { background: green } I would expect that the missing bracket would be added and parsed as [ ... ] and that the first valid rule-set would be p.test1. The current behavior in non IE browser seems to recover by eating the selector of the following rule-set. Like so. [].test1 error { background: green } error And recovering to parse correctly .test2 { background: green }. I now thinking that in the test cases 'blocks-031' and 'blocks-036' both should have lines showing green. -- Alan http://css-class.com/ Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
Received on Saturday, 26 March 2011 02:31:46 UTC