W3C home > Mailing lists > Public > public-css-archive@w3.org > September 2016

Re: [csswg-drafts] [css-device-adapt] @viewport is preloader-hostile

From: B via GitHub <sysbot+gh@w3.org>
Date: Fri, 09 Sep 2016 08:55:25 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-245857700-1473411324-sysbot+gh@w3.org>
Just want to share my thought and experience with dynamic viewports 
changes and @viewport.

As an author, I don't foresee a critical need for @viewport for my 
work, as long as Edge would support the Meta Viewport, and a bug free 
way to modify it on the fly. I do that currently to automatically 
switch a phone or tablet viewport to a desktop size via JS, if the 
user enable their browser's desktop mode feature. It's been painful 
however and still somewhat is, because of zoom issues on some engines,
 and not others, requiring hacky tricks to apply per engine. And I am 
using @viewport to on IEMobile with browser detection. While that 
works ok, the JS way of dealing with meta bugs, and those tricks is 
far from ideal.

And it's not very hard to imagine legit needs for @viewport in the 
context of an app or a game. To adjust the viewport on the fly in an 
inexpensive way, by just switching css files. Or to avoid dealing with
 various sizing constraints from legacy projects and/or easily change 
viewport size from one view to another. In which @viewport *does or 
may not necessarily have* to be preloader friendly for those 
particular contexts.

I would favor recommending the feature as no more than a convenient 
way to resize app views that way, so that devs are well aware of what 
it should be used for.  In that, I don't consider @viewport broken. 
 in Edge Tablet Mode at the moment, because of the way it was 
implemented back in IE10, compatibility issues and technical 
constraints AFAICT.

i.e. For me @viewport fits as a dynamic in-app on the fly solution. 
Not something that should aim at being preloader friendly or replace 
the standard initial viewport at initial load.

GitHub Notification of comment by hexalys
Please view or discuss this issue at 
using your GitHub account
Received on Friday, 9 September 2016 08:55:51 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:03 UTC