W3C home > Mailing lists > Public > www-style@w3.org > June 2009

[css3-mediaqueries] Syntax connecting MQ to CSS 2.1

From: Řyvind Stenhaug <oyvinds@opera.com>
Date: Thu, 11 Jun 2009 19:06:18 +0200
To: "www-style@w3.org" <www-style@w3.org>
Message-ID: <op.uvddssrkru61ud@oyvinds-desktop>
The Media Queries syntax section[1] says that "The media_query_list  
production defined below replaces the medium production from CSS2".  
However, according to the grammar in the latter document[2] a media rule  
may contain a comma-separated list of 'medium' tokens. My interpretation  
is that one would then end up with something like this:

media
   : MEDIA_SYM S* media_query_list [ COMMA S* media_query_list ]* LBRACE S*  
ruleset* '}' S*
   ;
media_query_list
   : S* media_query [ ',' S* media_query]* | S*
   ;

It looks like the " | S*" was added to the media_query_list production in  
order to allow "@media {}" while disallowing things like "@media ,,, {}".  
As far as I can see the latter doesn't actually work as currently written.

(The same applies to the import production.)

[1] http://www.w3.org/TR/css3-mediaqueries/#syntax
[2] http://www.w3.org/TR/2007/CR-CSS21-20070719/grammar.html#grammar

-- 
Řyvind Stenhaug
Core Norway, Opera Software ASA
Received on Thursday, 11 June 2009 20:48:34 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:18 GMT