W3C home > Mailing lists > Public > www-style@w3.org > February 2015

Re: [css-device-adaptation] Progress?

From: Yoav Weiss <yoav@yoav.ws>
Date: Fri, 20 Feb 2015 17:16:38 +0100
Message-ID: <CACj=BEiqsenBwfJEnRFRL3XVZAb-yBNbKw+p0nzWuu4s3SxUHg@mail.gmail.com>
To: Rune Lillesveen <rune@opera.com>
Cc: Kenneth Rohde Christiansen <kenneth.christiansen@gmail.com>, Florian Rivoal <florian@rivoal.net>, Matt Rakow <marakow@microsoft.com>, David Bokan <bokan@chromium.org>, "www-style@w3.org" <www-style@w3.org>
On Thu, Feb 19, 2015 at 11:45 AM, Rune Lillesveen <rune@opera.com> wrote:

> On Wed, Feb 18, 2015 at 10:45 PM, Yoav Weiss <yoav@yoav.ws> wrote:
> > My main problem with the device-adaptation spec and the `@viewport` rule
> is
> > that it enables external style sheets to impact the viewport dimensions.
> > That can introduce issues around viewport dimensions based resource
> loading
> > (so both <link media> based CSS and `srcset`/`<picture>` based responsive
> > images).
> >
> > One way to solve this would be to limit `@viewport` inline styles in the
> > document's head, and add smarts to the UAs parsing mechanisms so that
> they
> > can apply those rules when kicking off loading of viewport-dimensions
> based
> > resources.
>
> I agree the UA should be allowed to resolve the viewport based on
> inline styles in head, and it should be established as a "best
> practice", but I'm not sure we need to disallow authors to shoot
> themselves in the foot. Do we have other examples in CSS where we
> handle rules differently based on their origin?
>
>
Well, @import only works if it's placed before any other rule.
And, since it's a major performance foot gun, I think @import would also
make sense as an "inline-only" rule, but that ship has long sailed.

@viewport is worse than @import in the sense that it can impact and
invalidate or make redundant many other resources that were already
download, at least partially.

Since this foot gun has no visual implications when developing locally, I'm
afraid that when using @viewport, authors would shoot themselves in the
foot more often than not.
Received on Friday, 20 February 2015 16:17:10 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:52:01 UTC