[whatwg] Processing the zoom level - MS extensions to window.screen

On 11/24/2010 1:12 AM, Robert O'Callahan wrote:
> On Wed, Nov 24, 2010 at 9:09 PM, Charles Pritchard <chuck at jumis.com 
> <mailto:chuck at jumis.com>> wrote:
>
>     On 11/21/2010 4:12 PM, Robert O'Callahan wrote:
>>     On Sun, Nov 21, 2010 at 9:59 AM, Charles Pritchard
>>     <chuck at jumis.com <mailto:chuck at jumis.com>> wrote:
>>
>>         Rob: Mobile deployments using dpiPixelRatio (as has been
>>         adopted by Moz and Webkit) and target-DpiDensity work well on
>>         the mobile, they are not hooked to zoom on the desktop,
>>
>>
>>     It is in Firefox.
>     I just tested in 4b7, and it's not changing dpiPixelRatio.
>
>
> Try this:
> <style>
> div { display:none; }
> @media screen and (min--moz-device-pixel-ratio: 1.5) {
>   .in { display:block; }
> }
> @media screen and (max--moz-device-pixel-ratio: 0.66666666) {
>   .out { display:block; }
> }
> </style>
> <div class="in">Zoomed in by a factor of at least 1.5</div>
> <div class="out">Zoomed out by a factor of at least 1.5</div>
>
> Try zooming in a lot and zooming out a lot. It works for me.

While we're at it, can we get some agreement on that CSS selector? I 
can't speak for MS, but otherwise, it's a de facto standard.

That css selector is paired with the window.dpiPixelRatio variable per 
the webkit proposal.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20101124/5577fed3/attachment.htm>

Received on Wednesday, 24 November 2010 01:16:31 UTC