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

Re: [css3-mediaqueries] 'only'/'not' with omitted media type

From: Řyvind Stenhaug <oyvinds@opera.com>
Date: Fri, 24 Jul 2009 16:16:08 +0200
To: "L. David Baron" <dbaron@dbaron.org>
Cc: "www-style@w3.org" <www-style@w3.org>
Message-ID: <op.uxksk6giru61ud@oyvinds-desktop>
On Wed, 01 Jul 2009 00:09:04 +0200, L. David Baron <dbaron@dbaron.org>  

> On Friday 2009-06-12 17:33 +0200, Řyvind Stenhaug wrote:
>> Some of the prose regarding 'not' and 'only' is inconsistent with the
>> current syntax, e.g. this sentence from section 2:
>> "User agents must process media queries starting with 'only' as if the
>> 'only' keyword was not present."
>> @media only (color) { /* media query is dropped because the syntax
>> requires a media type */ }
>> @media (color) { /* match, assuming a color device */ }
> I don't think which way we choose here particularly matters,
> although I agree the spec should be internally consistent.  (The
> reason the 'only' feature was added [1] doesn't apply to queries
> with omitted media types... at least I don't think so.)

The other case would be more interesting: "@media not (color)" as  
syntactic sugar for "@media not all and (color)". But I assumed the syntax  
section was intentional and that the prose just had remnants from a  
previous version when media types were mandatory.

> In Gecko I implemented what the grammar says (i.e., dropping the
> first media query you give above).

Yes, Safari 4 does that too (and so does Opera's current internal  

Řyvind Stenhaug
Core Norway, Opera Software ASA
Received on Friday, 24 July 2009 14:16:50 UTC

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