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

I don't know how safe it is, but I have only come over it once while
debugging sites, and that time the web author was trying to use it to
detect whether a browser supported a specific media feature - a test which
was highly unreliable due to how it works today.

I don't think it is common, and if we change the syntax in WebKit, at least
we can add a warning which gets posted to the web inspector console.

Kenneth

On Thu, Nov 15, 2012 at 10:10 PM, Simon Sapin <simon.sapin@kozea.fr> wrote:

> Le 25/10/2012 11:24, Florian Rivoal a écrit :
>
>  On Tue, 23 Oct 2012 17:24:39 +0200, Kenneth Rohde Christiansen
>> <kenneth.christiansen@gmail.**com <kenneth.christiansen@gmail.com>>
>> wrote:
>>
>>> Is "not (media-feature)" forbidden per syntax?
>>>>>
>>>>   Yes.
>>>>
>>>
>>> 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?
>>>
>>
>> I agree it is not very intuitive the way it is, especially since media
>> types are less useful than initially intended. I would be happy to make
>> this change, but given how long media queries have been out there,
>> supported by everybody, I am not sure we can safely do it.
>>
>> As the syntax you want looks like it should work already, I am sure
>> people have used it, and they may have gotten their page to look the
>> way they want without noticing that the media query didn't work. If
>> we make it work, these rules will start having an effect, which
>> might no longer be the one originally desired.
>>
>> What does the rest of the WG think? Is this desirable (I think so)?
>> Is this safe enough (I don't know)?
>>
>
>
> This same issue just came up again:
> http://www.quirksmode.org/**blog/archives/2012/11/what_**the_hells.html<http://www.quirksmode.org/blog/archives/2012/11/what_the_hells.html>
>
> I think we should change the grammar.
>
> How can we assess how "safe" the change would be?
>
> --
> Simon Sapin
>



-- 
Kenneth Rohde Christiansen
Senior Engineer, WebKit, Qt, EFL
Phone  +45 4093 0598 / E-mail kenneth at webkit. <http://gmail.com>org

﹆﹆﹆

Received on Thursday, 15 November 2012 21:36:20 UTC