W3C home > Mailing lists > Public > public-css-archive@w3.org > January 2017

Re: [csswg-drafts] [mediaqueries] Should a top-level not be evaluated as a <media-not> if possible?

From: Florian Rivoal via GitHub <sysbot+gh@w3.org>
Date: Wed, 18 Jan 2017 13:44:32 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-273478446-1484747071-sysbot+gh@w3.org>
> However, none of the browsers implement this. I expect because they 
treat the "not" as the prefix to a <media-type>, and then decide that 
the type is invalid.

Well, I'd phrase this differently. none of the browsers implement this
 because what they implement is Media queries level 3, which had a 
much simpler grammar without the full boolean logic:
https://drafts.csswg.org/mediaqueries-3/#syntax

> It seems a bit silly that you can't write something like this:
> `@media not (prefers-reduced-motion) {}`

Yes, it would be great if we could do that, which is why the spec says
 you can. But this ability to do generic logic with arbitrary 
and/or/not and not having to involve media types is new in Media 
queries 4.

As far as I can tell, the action item is on you (and other vendors) to
 actually implement this new generalized syntax. You may be able to 
reuse a good chunk of what you already implemented for `@supports`, 
since that's very similar.

-- 
GitHub Notification of comment by frivoal
Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/952#issuecomment-273478446 
using your GitHub account
Received on Wednesday, 18 January 2017 13:44:39 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:30:28 UTC