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

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.

Agreed.


> 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
http://annevankesteren.nl/

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