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

RE: [CSS2.1] Grammar for @media versus general block parsing

From: Justin Rogers <justrog@microsoft.com>
Date: Fri, 4 Jul 2008 12:11:21 -0700
To: fantasai <fantasai.lists@inkedblade.net>, Bjoern Hoehrmann <derhoermi@gmx.net>
CC: "www-style@w3.org" <www-style@w3.org>
Message-ID: <00BD06E707F60B4F9D6A3E75C712209D53DBCDEA60@NA-EXMSG-C104.redmond.corp.microsoft.com>

The grammar needs at least at-rule added but I agree that making it stylesheet would be really bad. As an implementer it makes no sense for me to go into at-rule error recovery or at-rule parsing inside of the media block if the grammar doesn't even allow the construct to exist. Of course, this is why this discussion started because IE/Opera read the grammar to disallow at-rule altogether and so go into rule-set error recovery whenever something is seen that isn't understood.

Grammar wise adding at-rule will force me to put in code to process at-rule's within the media block. Spec wise saying that at-rules are to be ignored if present (and consequently that at-rule error recovery should be used on a syntax error and not rule-set error recovery) will make the forward compatible stuff work as expected.

Justin Rogers [MSFT]

-----Original Message-----
From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf Of fantasai
Sent: Thursday, July 03, 2008 4:09 PM
To: Bjoern Hoehrmann
Cc: www-style@w3.org
Subject: Re: [CSS2.1] Grammar for @media versus general block parsing


Bjoern Hoehrmann wrote:
> * fantasai wrote:
>> Proposal:
>>   Change 'ruleset' to 'stylesheet' in the @media grammar.
>>   State in 7.2.1 that "At-rules inside @media are invalid in CSS2.1
>>   and must be ignored per 4.2 Rules for handling parsing errors."
>
> That would allow CDO and CDC in @media which is probably not intended. I
> tested this when the issue came up, I think only IE6 had interesting be-
> havior for this case.

So would only making the change in 7.2.1 and not changing
the grammar be adequate?

~fantasai
Received on Friday, 4 July 2008 19:12:16 GMT

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