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

Re: [css-device-adapt] CSS Device Adaptation and Screen Orientation API

From: Kenneth Rohde Christiansen <kenneth.r.christiansen@intel.com>
Date: Thu, 8 Nov 2012 16:09:50 +0100
Message-ID: <CAEC208vzUPyzUCjoCKmJiwP9WK+YseSu11NUGbA_GYfPGmQj6w@mail.gmail.com>
To: Mounir Lamouri <mounir@lamouri.fr>
Cc: www-style@w3.org
Hi there,

I think it makes sense having both. CSS is about presentation and I believe
that orientation is part of that, where as the lockOrientation is a way to
set the orientation as a result of a user action (which probably should be
restricted if the orientation is set via CSS).

Setting orientation via CSS works well together with media queries. For
instance you can make a layout of a online magazine that works in landscape
and portrait, but the landscape mode might not work well on sizes less than
the size of a 8" tablet so for those you set orientation to portrait only.

I don't mind adding support for portrait-primary, etc, but if we add that
they should be supported by the (orientation: *) media features as well.

Cheers
Kenneth

On Thu, Nov 8, 2012 at 3:57 PM, Mounir Lamouri <mounir@lamouri.fr> wrote:

> Hi,
>
> In the WebApps WG, we are trying to work on an API that would allow
> reading, and locking the screen orientation from script. See:
> http://dvcs.w3.org/hg/screen-orientation/raw-file/tip/Overview.html
>
> The use cases we wanted to solve with that API required us to be able to
> lock on a specific orientation (for example games) so we had to define
> more orientation values like 'portrait-primary', 'portrait-secondary',
> 'landscape-primary' and 'landscape-secondary'. Those values allow a
> better granularity for the orientation locking but also allow reading
> the exact current orientation.
>
> So, actually, I wonder if the CSS Device Adaptation would still be
> interested in keeping the 'orientation' property even if there is now an
> API that allows to do more. I'm not certain there is a huge use case for
> declarative orientation lock other than for web apps but that should
> happen in the manifest format. I am not trying to push to remove this
> feature, just asking.
>
> Also, given that Screen Orientation API defines a larger set of values,
> would the CSS Device Adaptation specification be interested in using
> those for the 'orientation' property?
>
> Cheers,
> --
> Mounir
>
>


-- 
---------------------------------------------------------------------
Intel Denmark Aps
Langelinie Alle 35, DK-2100 Copenhagen
CVR No. 76716919

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
Received on Thursday, 8 November 2012 15:10:49 GMT

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