Re: Behavior of device-pixel-ratio under zoom

On Sun, 11 Nov 2012 01:48:49 +0100, Robert O'Callahan  
<robert@ocallahan.org> wrote:

> Should devicePixelRatio and device-pixel-ratio be affected by browser  
> zoom?
>
> It seems to me that if the user zooms in a persistent way, it would make
> sense to adjust device-pixel-ratio to match. For example, if the user
> always views the page with a zoom of 2x on a 96dpi desktop screen, then
> there are two device pixels per CSS pixel and device-pixel-ratio should  
> be
> 2.
>
> OTOH I can see that if the user zooms in and out a lot just to navigate  
> (as
> is often the case on mobile browsers), we might not want  
> device-pixel-ratio
> to vary.
>
> Perhaps it should be up to the browser?

This thread seems to conclude that devicePixelRatio should be affected by  
page zoom (which affects the size of the initial viewport) but not by  
pinch zoom (which doesn't). I've specified devicePixelRatio as such in  
CSSOM View.

http://dev.w3.org/csswg/cssom-view/#dom-window-devicepixelratio

Bug for devicePixelRatio:  
https://www.w3.org/Bugs/Public/show_bug.cgi?id=23228

The 'resolution' media feature doesn't discuss zoom, which seems like a  
bug. I've filed https://www.w3.org/Bugs/Public/show_bug.cgi?id=23548

-- 
Simon Pieters
Opera Software

Received on Thursday, 17 October 2013 14:55:03 UTC