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

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

From: Yoav Weiss via GitHub <sysbot+gh@w3.org>
Date: Fri, 01 Jul 2016 21:27:52 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-230051099-1467408470-sysbot+gh@w3.org>
What @jacobrossi said. Also, the problem is particularly bad for 
images, but it also applies to any link element with a `media` 
attribute, including external styles, `preload`, and to some extent 

With `@viewport` you cannot *know* the dimensions of the viewport 
until you finished parsing (or at least tokenizing) all your HTML, 
found all external styles, downloaded all of them in their entirety 
and parsed them. If you also have blocking scripts before any one of 
your external styles, guess what? You have to wait on them as well** .
 Only then can you start downloading your responsive assets.

Otherwise, on the deployability front, browsers will have to continue 
to support `<meta viewport>` forever  and authors would have to 
continue sending down `<meta viewport>` for years to come. So IMO, we 
have to properly spec what it does, and we might as well try to extend
 it in a backwards compatible way to support the use-cases that it 
doesn't cover today.

I very much support @ChumpChief's proposal to start with the use-cases
 that need handling and work our way from there.

** The script part can be optimized away by creating a CSS preloader 
that looks for `@viewport` tokens, but that'd definitely add 
complexity for no good reason other than `@viewport`'s design.

GitHub Notification of comment by yoavweiss
Please view or discuss this issue at 
using your GitHub account
Received on Friday, 1 July 2016 21:27:59 UTC

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