W3C home > Mailing lists > Public > www-style@w3.org > March 2013

Re: [css3-mediaqueries] device-width/device-height on rotatable devices

From: Simon Sapin <simon.sapin@exyr.org>
Date: Thu, 07 Mar 2013 23:27:48 +0100
Message-ID: <51391464.4010603@exyr.org>
To: James Holderness <j4_james@hotmail.com>
CC: www-style@w3.org
Le 07/03/2013 18:29, James Holderness a écrit :
> Also while we're on the subject of device queries, what is the point of the
> reference to square pixels in the device-aspect-ratio example. If a screen
> device has 1280 horizontal pixels and 720 vertical pixels, but they aren't
> square pixels, would the reported device-aspect-ratio be any different from
> 16/9? The definition suggests not, but then why mention square pixels at
> all?

device-aspect-ratio is unambiguously defined as "the ratio of the value 
of the ‘device-width’ media feature to the value of the ‘device-height’ 
media feature."

As to device-width and device-height, section 6 says that CSS units are 
used. In particular, 1280px is counted in CSS pixels, which might not be 
the same as device pixels.

I suppose that CSS pixels are expected to be square, which means a 
different horizontal and vertical 'resolution' if device pixels are not.

The spec could probably be more explicit every time it mentions 
"pixels". Maybe some of this text dates from a time when CSS px and 
(screen) device pixels were always the same.

-- 
Simon Sapin
Received on Thursday, 7 March 2013 22:28:16 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:06 GMT