W3C home > Mailing lists > Public > www-style@w3.org > April 2008

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

From: Anne van Kesteren <annevk@opera.com>
Date: Mon, 07 Apr 2008 17:05:34 +0200
To: "Brad Kemper" <brkemper@comcast.net>
Cc: "L. David Baron" <dbaron@dbaron.org>, www-style@w3.org
Message-ID: <op.t88xjki864w2qv@annevk-t60.oslo.opera.com>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:04 GMT