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

+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