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

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 UTC