Re: [css3-mediaqueries] Is 'resolution' in terms of device pixels or CSS pixels?

On Mon, 07 Apr 2008 17:00:08 +0200, Brad Kemper <brkemper@comcast.net>  
wrote:
> It does make sense to keep it if you think about something like an  
> iPhone, that has high resolution and a width of 480 device pixels. On  
> something like that, because the resolution is so high, I'm going to  
> want to use fairly large font sizes, so that you don't have to squint to  
> read it. But on something else, like a 72 dpi monitor, I might want to  
> use smaller font sizes instead, since the pixels will be larger, and  
> therefore the text will appear larger. By using smaller text on a low  
> res monitor, I can fit more on the screen, and it does not appear to be  
> that small because the pixels are all huge.

You actually want the proprietary -webkit-device-pixel-ratio for that, not  
resolution.


>>> http://www.w3.org/TR/2007/CR-css3-mediaqueries-20070606/#units is
>>> clear that 'px' always mean CSS pixels,
>
> That seems odd to me. I'm curious to know the reasoning behind that.

You want to know the viewport width in the units you're going to use, not  
the viewport width in device pixels.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Monday, 7 April 2008 15:06:06 UTC