W3C home > Mailing lists > Public > www-style@w3.org > November 2013

Re: [mediaqueries] Intentional that "not" is only usable in front of a media type?

From: L. David Baron <dbaron@dbaron.org>
Date: Tue, 12 Nov 2013 16:54:53 +0800
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
Message-ID: <20131112085453.GA16357@crum.dbaron.org>
On Tuesday 2013-11-12 00:40 -0800, Tab Atkins Jr. wrote:
> According to the grammar in Media Queries, the "not" keyword is only
> allowed in front of a media type.  You can't put it in front of a set
> of media features, like "not (color)".
> However, as far as I can tell, using a "not" negates the entire query,
> not just the type.  That is, "not screen and (color)" means "not a
> color screen", rather than "not a screen, but has color".
> Am I right in interpreting this?  If not, I need to revise the spec to
> make this more clear.

I believe you are correct.

> If I am, does anyone have any clue why this grammar restriction
> exists?  It seems more reasonable to let it apply to media features
> without a media type as well.

I'd like to relax these restrictions and make the media queries
grammar a lot more like the @supports condition grammar.  I think
there were others in favor the last time I brought that up.

(I'm hoping it's one of the big things on the table for the next
level of media queries, along with refactoring the characteristics
of media types into media queries and pretty much deprecating the


𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                          https://www.mozilla.org/   𝄂
             Before I built a wall I'd ask to know
             What I was walling in or walling out,
             And to whom I was like to give offense.
               - Robert Frost, Mending Wall (1914)

Received on Tuesday, 12 November 2013 08:55:22 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:36 UTC