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

fantasai wrote:
> 
> Justin Rogers wrote:
>> An @media block in the grammar is defined as a MEDIA_SYM followed by 
>> an LBRACE followed by optional rule-sets followed by an RBRACE. 
>> Because @media is a known at-block with pre-defined semantics we treat 
>> the grammar piece as absolute and I think other browsers do as well, 
>> but there is one discrepancy. Here is the test case and the results.
>> ...
>> So the question is, should the grammar in this case be read strictly 
>> since it clearly points out a semantic for the @media block, and thus 
>> only allow rule-sets making the Opera/IE 8 behavior correct? Or should 
>> the parsers allow any statement within the block including the at-rule?
> 
> Recorded as CSS2.1 Issue 62:
>   http://lists.w3.org/Archives/Public/www-style/2008Jun/0245.html
> 
> I think we want Firefox's behavior here, as that is forwards-compatible.

Revised proposal:
    State in 7.2.1 that "At-rules inside @media are invalid in
    CSS2.1. Invalid at-rules inside @media blocks must be ignored
    per 4.2 Rules for handling parsing errors."

~fantasai

Received on Wednesday, 30 July 2008 08:27:58 UTC