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

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

From: Brad Kemper <brkemper@comcast.net>
Date: Sun, 9 Mar 2008 20:52:33 -0700
Message-Id: <0E72A24B-BE3D-402E-81DF-7E8D4A34D488@comcast.net>
Cc: "L. David Baron" <dbaron@dbaron.org>, Anne van Kesteren <annevk@opera.com>, "www-style@w3.org" <www-style@w3.org>
To: Justin Rogers <justrog@microsoft.com>

On Mar 8, 2008, at 7:09 PM, Justin Rogers wrote:

> An at-rule consists of everything up to and including the next  
> semicolon (;) or the next block, whichever comes first.
> <<<
>
> @media all { @ }
> div { color: green; }
>
> I think the sticky point for this test case is what takes priority  
> in error recovery. The open parenthesis starts a block which is  
> owned by the @media. The closing parenthesis should close the block  
> because it is currently the only open block and we found a matching  
> closing character. We may do this while we are in error recovery  
> for something else like a selector though. So, does error recovery  
> stop once your parent block is closed? I don't think we should  
> trump the higher level rules of matching blocks because we find a  
> syntactic issue with the internals of the block itself since at- 
> rule's hold blocks and blocks hold any. If it can hold any, then it  
> also means it could hold just an asterisk and nothing more. So when  
> we think we are in error recovery for a selector we should also be  
> aware that we may have to short circuit because the block  
> containing the selector is closed.

That seems sensible to me. When I look at "@media all { @ }" my  
common sense tells me that there is a closed @media block there, with  
nonsense inside the block that should be ignored. So it would be nice  
if the spec reflected my expectations.
Received on Monday, 10 March 2008 03:52:52 GMT

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