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

Robert O'Callahan robert at ocallahan.org
Wed Nov 24 01:12:54 PST 2010


On Wed, Nov 24, 2010 at 9:09 PM, Charles Pritchard <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>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.

Rob
-- 
"Now the Bereans were of more noble character than the Thessalonians, for
they received the message with great eagerness and examined the Scriptures
every day to see if what Paul said was true." [Acts 17:11]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20101124/37611b61/attachment-0002.htm>


More information about the whatwg mailing list