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

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

From: Anne van Kesteren <annevk@opera.com>
Date: Fri, 24 Jul 2009 16:35:21 +0200
To: "L. David Baron" <dbaron@dbaron.org>, Øyvind Stenhaug <oyvinds@opera.com>
Cc: "www-style@w3.org" <www-style@w3.org>
Message-ID: <op.uxktg7vg64w2qv@annevk-t60>
On Wed, 01 Jul 2009 00:16:24 +0200, L. David Baron <dbaron@dbaron.org> wrote:
> 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.)

I'm ok either way though allowing @media {} would give consistency with media="" from HTML (and was the intention, admittedly).

Anyone else?

Anne van Kesteren
Received on Friday, 24 July 2009 14:36:17 UTC

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