Re: [css3-mediaqueries] (min-resolution: 0dpi) is false in several browsers.

Hi,

I can add a test for this to my WebKit patch:
https://bugs.webkit.org/show_bug.cgi?id=99077

I actually have a question on what (resolution) should evaluate to due
to the suggested dppx. This is the comment from the current iteration
of the patch:

+    // According to spec, (resolution) will evaluate to true if (resolution:x)
+    // will evaluate to true for a value x other than zero or zero followed by
+    // a valid unit identifier (i.e., other than 0, 0dpi, 0dpcm, or 0dppx.).
+    //
+    // This is actually always the case with the dppx, which we ignore as it is
+    // a special-case in the sense it can be out of sync with dpi and dpcm. For
+    // instance, both a device with 96dpi and 160dpi can have a dppx of 1.
+    //
+    // This leaves the case of squared pixels.

Ignoring dppx as that means (resolution) will always return true, this
should be more in line with other browsers.

Any take on this?

Cheers
Kenneth


On Sun, Oct 21, 2012 at 1:37 PM, Kenneth Rohde Christiansen
<kenneth.christiansen@gmail.com> wrote:
> I think that is correct.
>
> According to my interpretation of the spec, (resolution) will evaluate
> to true if (resolution:x) will evaluate to true for a value x other
> than zero or zero followed by a valid unit identifier (i.e., other
> than 0, 0dpi, 0dpcm, or 0dppx.).
>
> I would guess that means that 0, odpi, etc should evaluate to false.
>
> Cheers
> Kenneth
>
>
> On Sun, Oct 21, 2012 at 1:32 PM, Simon Sapin <simon.sapin@kozea.fr> wrote:
>> Hi,
>>
>> Apparently Firefox, Opera, and IE10 all agree that the media query
>> (min-resolution: 0dpi) is false, but (min-resolution: 0.1dpi) is true:
>>
>> http://www.quirksmode.org/blog/archives/2012/10/the_curious_cas.html
>>
>> I think this is a bug, but finding the same bug is three implementations is
>> surprising. Did I miss something in the spec?
>>
>> Cheers,
>> --
>> Simon Sapin
>>
>
>
>
> --
> Kenneth Rohde Christiansen
> Senior Engineer, WebKit, Qt, EFL
> Phone  +45 4093 0598 / E-mail kenneth at webkit.org
>
> ﹆﹆﹆



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

﹆﹆﹆

Received on Sunday, 21 October 2012 11:43:02 UTC