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

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

From: fantasai <fantasai.lists@inkedblade.net>
Date: Thu, 03 Jul 2008 15:48:51 -0700
Message-ID: <486D5753.1000303@inkedblade.net>
To: Justin Rogers <justrog@microsoft.com>
CC: "www-style@w3.org" <www-style@w3.org>

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:

I think we want Firefox's behavior here, as that is forwards-compatible.

   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."

Received on Thursday, 3 July 2008 22:49:29 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:38 UTC