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: Sat, 09 Mar 2013 21:14:00 +0100
Message-ID: <513B9808.4050709@exyr.org>
To: James Holderness <j4_james@hotmail.com>
CC: www-style@w3.org
Le 09/03/2013 15:36, James Holderness a ťcrit :
> I understand that, but you'll notice that there's no corresponding
> device-orientation feature,

(orientation: portrait) is the same as (max-aspect-ratio: 1/1). You 
could use min/max-device-aspect-ratio if thatís really what you want.

> which is a bit odd considering that's probably
> what most people think of when you talk about orientation.

Iím not sure. Whatís important is which direction gives you more space 
to display stuff. Thatís the viewportís aspect ratio, not the deviceís.

> Firefox, Chrome and IE9 all reported the rotated device dimensions (i.e. the
> width and device-width are on the same axis, as you expect). However, they
> don't re-evaluate on rotate - only after a refresh (or a window resize in
> the case of Firefox and IE).
> Opera determined the device dimensions at startup and stuck with that
> regardless of the orientation (i.e. the width and device-width are not
> necessarily on the same axis, much like iOS). No amount of refreshing or
> resizing made any difference.
> FWIW, I agree with your interpretation of the spec, but I haven't heard any
> of the browser vendors chiming in to say they're going to fix their
> implementations. There's clearly an interoperability issue here, and I'm
> surprised nobody seems particularly concerned by that.

Note the "not required" in the related spec text:

# User agents are expected, but not required, to re-evaluate and
# re-layout the page in response to changes in the user environment,
# for example if the device is tilted from landscape to portrait mode.

IMO this is an issue on mobile and should be fixed (Do the respective 
browser have bugs reported?) because rotating is part of "normal use", 
but not as much of an issue on non-mobile where rotating a monitor or 
changing its resolution is more part of "set up" (which I donít have a 
good definition for.)

Simon Sapin
Received on Saturday, 9 March 2013 20:14:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:27 UTC