Re: [CSS 2.1] General at-blocks and error recovery

On Jan 27, 2008, at 12:18 PM, Brad Kemper wrote:

>
> On Jan 26, 2008, at 8:20 PM, Justin Rogers wrote:
>
>> @1;
>> DIV { color: green; }
>>
>> Then you would expect the DIV rule to get thrown out. However, if  
>> you treat @1 like an actual at rule, then you could technically  
>> start your reparse at the semi-colon. Browsers again disagree with  
>> FireFox/Opera eating the entire declaration while Safari is  
>> perfectly happy going into at rule error recovery instead.
>
> It looks to me as though Opera (9.25 on Mac OS X) is also applying  
> the rule.

In fact, here is what I found...

green in Safari and Opera (not FireFox):
    @1; div { color:green; }
or:
    @1 []; div { color:green; }

green in Opera only:
    @1 [{}]; div { color:green; }

green in Opera only (with ALL subsequent rules seemingly ignored in  
Safari and FireFox):
@media all {
    @
}
div { color:green; }

green in Opera and Safari (with ALL subsequent rules seemingly  
ignored in FireFox):
    @1 { [ }
    	div { color:green;}

on this last one, adding a "]" or ";"  anywhere after the first "}"  
does not seem to help FireFox recover.

I should mention that this is with FireFox 3.0b2, and a nightly  
download of Webkit, 3.0.4 (523.12.2). I don't have IE handy here, so  
I don't know how it responds.

Received on Sunday, 27 January 2008 21:15:08 UTC