On Mar 25, 2011, at 9:51 AM, Philippe Wittenbergh wrote:

> 
> On Mar 25, 2011, at 3:18 AM, Alan Gresley wrote:
> 
>> <http://css-class.com/test/css/parsing/invalid-blocks2.htm>
>> 
> 
> Basically, in both cases you have an invalid  selector
> p [background: blue} .test1
> and everything is ignored until the 1st instance of 'green}'
> 
> The 1st valid selector after p{} is .test2
> 

For those following at home:
Following a discussion on the WW-style mailing list, the above is not correct. 
Based on latest revisions of the CSS 2.1 spec, 
>  the specification to require {[()]} matching when parsing selectors

<http://lists.w3.org/Archives/Public/www-style/2011Mar/0579.html>

This means that given
p [background: blue} /* mismatched opening '[' */
.test1 { /*property:value*/ }
.test2 { /*property:value*/ }

the whole of the stylesheet that follows the mismatched opening '[' will be 
thrown out. That is the behaviour of IE 8 & 9 and will be the behaviour of a 
future version of Firefox.

(and the CSS validator will need to be updated to match the spec revision…)

Philippe
--
Philippe Wittenbergh
http://l-c-n.com/






______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to