W3C home > Mailing lists > Public > www-style@w3.org > January 2008

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

From: Brad Kemper <brkemper@comcast.net>
Date: Sun, 27 Jan 2008 13:14:52 -0800
Message-Id: <B223715C-17BA-43EA-BA82-4DD36DBCF1DD@comcast.net>
Cc: Justin Rogers <justrog@microsoft.com>
To: "www-style@w3.org Style" <www-style@w3.org>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:00 GMT