W3C home > Mailing lists > Public > www-style@w3.org > October 2012

Re: [css-device-adapt][media-queries] device-width/height

From: Rune Lillesveen <rune@opera.com>
Date: Wed, 10 Oct 2012 13:44:12 +0200
To: www-style@w3.org
Message-ID: <op.wlyn7yxy8isf1p@id-c1005.oslo.osa>
On Wed, 10 Oct 2012 13:32:32 +0200, Kenneth Rohde Christiansen  
<kenneth.r.christiansen@intel.com> wrote:

> Hi,
>
> In the CSS Device Adaptation spec, device-width is defined as
>
> "The width of the screen in CSS pixels at zoom factor 1.0."
>
> But in CSS3 Media Queries the media query is defined as:
>
> "The ‘device-width’ media feature describes the width of the rendering
> surface of the output device. For continuous media, this is the width
> of the screen. For paged media, this is the width of the page sheet
> size."
>
> Currently some user agents (like iOS Safari) uses the exact same
> values for device-width when used as part of the viewport meta tag (or
> Device Adaptation) and when queried by media queries. This makes sense
> for me. The value is in CSS units.
>
> Unfortunately this is not clearly stated in the CSS3 Media Queries
> spec, and other user agents (say, Chrome for Android) uses device
> units instead of CSS units, when queried.
>
>
> Could we clean this up? Like either state in CSS3 Media Queries that
> these are in CSS units or add a note in the CSS Device Adaptation
> spec?

The Media Queries spec looks clear to me.

The Units section in Media Queries says:

"The units used in media queries are the same as in other parts of CSS.  
For example, the pixel unit represents CSS pixels and not physical pixels."

Furthermore, the example in the 'device-width' section says:

"... The ‘px’ unit is of the logical kind, as described in the Units  
section."

-- 
Rune Lillesveen
Layout Group Manager
Core Technology Department
Opera Software ASA
Received on Wednesday, 10 October 2012 11:44:43 GMT

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