W3C home > Mailing lists > Public > www-style@w3.org > October 2012

Re: [css3-mediaqueries] not (media-feature)

From: Kenneth Rohde Christiansen <kenneth.christiansen@gmail.com>
Date: Tue, 23 Oct 2012 17:24:39 +0200
Message-ID: <CAEC208uT9TJTWvsm338Sa8Qz_Pn7xewsQjtRec2smWVPvK6T7g@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: www-style@w3.org
It seems a bit counter intuitive and conflicting with:

"The logical NOT can be expressed through the ‘not’ keyword. The
presence of the keyword ‘not’ at the beginning of the media query
negates the result. I.e., if the media query had been true without the
‘not’ keyword it will become false, and vice versa."

I stumpled upon this while debugging a website stating that we (tested
with Chrome) didn't support the monochrome media query.

Maybe we should just fix the grammar?

Cheers
Kenneth

On Tue, Oct 23, 2012 at 5:18 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 10/23/12 11:07 AM, Kenneth Rohde Christiansen wrote:
>>
>> Is "not (media-feature)" forbidden per syntax?
>
>
> Yes.  http://dev.w3.org/csswg/css3-mediaqueries/#syntax says:
>
> media_query
>  : [ONLY | NOT]? S* media_type S* [ AND S* expression ]*
>  | expression [ AND S* expression ]*
>  ;
>
> So "not" is only usable with a media type.  e.g.:
>
>   not all and (monochrome)
>
>
>> If so, what is the reason for that?
>
>
> This I don't know offhand.
>
> -Boris
>
>



-- 
Kenneth Rohde Christiansen
Senior Engineer, WebKit, Qt, EFL
Phone  +45 4093 0598 / E-mail kenneth at webkit.org

﹆﹆﹆
Received on Tuesday, 23 October 2012 15:25:32 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:01 GMT