Re: [css3-mediaqueries] Syntax connecting MQ to CSS 2.1

On Thursday 2009-06-11 19:06 +0200, Øyvind Stenhaug wrote:
> 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:

Yeah, this seems wrong.

One possible fix would be to say that for CSS usage of media
queries, the "media_query" production replaces the "medium"
production from CSS 2.1.  This would mean that "@media {}" would be
invalid.  This would leave the "media_query_list" production to be
used only by other specifications.

I think the next easiest change would be to make an editorial change
to CSS 2.1, and add another production:
  media_list
    : medium [ COMMA S* medium ]
    ;
and then change both the "import" and "media" productions to
reference media_list instead of writing out the above syntax by hand
in both places.  Then css-mediaqueries could says that
media_query_list replaces media_list.  This would mean that "@media
{}" is valid.

For what it's worth, Gecko accepts "@media {}" (as meaning the same
as "@media all {}").  (I think it has since I implemented media
queries, but didn't before.)

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/

Received on Tuesday, 30 June 2009 22:17:15 UTC