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

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. 
It's 
[disabled](http://developer.microsoft.com/en-us/microsoft-edge/platform/issues/7970618/)
 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 
https://github.com/w3c/csswg-drafts/issues/258#issuecomment-245857700 
using your GitHub account

Received on Friday, 9 September 2016 08:55:51 UTC