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

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 UTC