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

Re: [css-device-adapt] Remove support for device-width, device-height

From: John Mellor <johnme@chromium.org>
Date: Wed, 29 May 2013 12:02:41 +0100
Message-ID: <CAG_kaUbBq0NBeni8k5F7e0T5YJaPsHBOW8Cd+iwOW8Y4=H3pSQ@mail.gmail.com>
To: Rune Lillesveen <rune@opera.com>
Cc: www-style list <www-style@w3.org>, Alexandre Elias <aelias@chromium.org>
+1. When authors use width=device-width what they usually intend is "this
website has a flexible width layout, and its width should fit the window
size, rather than being zoomed".

So in extending viewports from mobile into contexts where windows aren't
always full width, it no longer makes sense to specify viewports in terms
of the full width/height of the device.

So I support removing device-width/height from @viewport, but I would go
further, and when translating meta
viewport<http://dev.w3.org/csswg/css-device-adapt/#translation-into-atviewport-descriptors>,
I would map width=device-width onto a width:auto @viewport (assuming
width:auto means window width - i.e. I'd want "width=device-width" on its
own to behave the same as "zoom:1").


On Wed, May 29, 2013 at 9:22 AM, Rune Lillesveen <rune@opera.com> wrote:

> There have been experimentation with enabling viewport meta for all
> products in Blink and I was brought into the discussion.
>
> Device-width and device-height works when the browser window uses the
> whole screen and isn't resizable. When you start to support @viewport (or
> viewport meta) in browsers where the window is smaller than the screen,
> you'll get undesireable results. The question is if there is really a need
> for device-width/device-height at all since the author would normally mean
> "@viewport { width: auto; height: auto; }" instead.
>
> The viewport meta background is that Safari and Presto, at least, have
> been truly using device-width and device-height as what they are: width and
> height of the device in CSS px. It's detectable for device-height as
> content="initial-scale=1" will give you an ICB height that subtracts the
> height of the UI chrome from the device-height, while
> content="height=device-height" will give you the height of the screen in
> CSS px regardless of the presence of UI chrome. Now, the current
> implementation in Blink will actually translate device-width/height to the
> width/height of the ICB established by the browser window showing no
> difference between content="initial-scale=1" and content="height".
>
> An important argument in favor of removing the support for the device-*
> values in @viewport is that authors would likely continue to use those
> values as they match what they're used to from viewport meta, which would
> be bad.
>
> PROPOSAL: Remove device-width and device-height from <viewport-length> and
> keep them in the viewport meta part.
>
> --
> Rune Lillesveen
>
>
Received on Wednesday, 29 May 2013 11:03:23 UTC

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