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

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

From: James Holderness <j4_james@hotmail.com>
Date: Sat, 9 Mar 2013 22:37:54 +0000
Message-ID: <BLU0-SMTP105F79F3A2158B7FFB6FEC5BEE70@phx.gbl>
To: "Simon Sapin" <simon.sapin@exyr.org>
CC: <www-style@w3.org>
> (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.

It's the asymetry I find weird - why add the one and not the other if in 
both cases you're not getting anything you couldn't already achieve with an 
aspect-ratio/device-aspect-ratio query? And it only works with 
device-aspect-ratio if that value actually changes on orientation change, 
which is exactly the problem we're having here.

>> 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.

It's not which is most important - it's what the word means. The word 
'orientation' suggests an indication of direction - which way something is 
pointing, or the angle at which it is being held - it's got nothing to do 
with shape as I understand it. The words 'portrait' and 'landscape' are 
merely convenient labels for the possible angles the device can be held.

And a proper device-orientation feature (one not dependent on shape) would 
at least have had some usefulness on devices that are square.

Anway, this has become a somewhat pointless discussion. I'm not trying to 
argue for a spec change or anything. As I said before, I just thought the 
existence of a device-orientation feature would have made Apple's bug more 
obvious. As it is, I wouldn't be surprised if they claimed their behavior 
was intentional.

> 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.

I am aware of that. I find it annoying that browsers don't re-evaluate on 
orientation change (although they can often be tricked into doing so) and I 
suspect it's likely a bug rather than a deliberate choice, but that's not my 
primary concern.

It should never be the case that when opening a new web page, on devices 
with the same dimensions and orientation, different browsers match different 
values for device-width and device-height. That's what I'm seeing with Opera 
on Windows and Safari on iOS. That can't be explained away with "not 
required to re-evaluate". That's the issue that really needs to be 
addressed.

> 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.)

Given Windows 8 is a full desktop operating system running on a tablet, and 
I believe Ubuntu is doing the same thing now too, I don't think you can 
really make a clear cut distinction between what is considered mobile and 
what isn't.

As for bugs, Apple's bug tracker is private, and Opera suggests searching 
their forums, which didn't turn up anything useful. I have no intention of 
filing bugs with either of them.

Regards
James
Received on Saturday, 9 March 2013 22:38:23 GMT

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