- From: L. David Baron <dbaron@dbaron.org>
- Date: Tue, 30 Jun 2009 15:16:24 -0700
- To: Øyvind Stenhaug <oyvinds@opera.com>
- Cc: "www-style@w3.org" <www-style@w3.org>
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