<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Media Query should allow negation for media feature when media type is not specified"
href="https://bugs.webkit.org/show_bug.cgi?id=167031#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Media Query should allow negation for media feature when media type is not specified"
href="https://bugs.webkit.org/show_bug.cgi?id=167031">bug 167031</a>
from <span class="vcard"><a class="email" href="mailto:dino@apple.com" title="Dean Jackson <dino@apple.com>"> <span class="fn">Dean Jackson</span></a>
</span></b>
<pre>Here's how I'm reading the spec....
Suppose we have:
div {
width: 100px;
height: 100px;
background-color: red;
}
@media not (min-width: 600px) {
div {
background-color: blue;
}
}
Then the @media rule follows
[[[
2.2.1. Negating a Media Query: the not keyword
An individual media query can have its result negated by prefixing it with the keyword not. If the media query would normally evaluate to true, prefixing it with not makes it evaluate to false, and vice versa.
]]]
And it gives an example.
However, I don't this this rule applies in this case. Check out Section 3. Syntax.
<media-query> = <media-condition>
| [ not | only ]? <media-type> [ and <media-condition-without-or> ]?
In our example, it matches <media-condition>, rather than "not <media-type>".
<media-condition> = <media-not> | <media-and> | <media-or> | <media-in-parens>
Cool. It looks like we are a <media-not>.
<media-not> = not <media-in-parens>
<media-in-parens> = ( <media-condition> ) | <media-feature> | <general-enclosed>
So this is a media-not, that has a media-in-parens that is a media-feature.
None of the browsers follow this behaviour though.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>