Re: Media Query Variables

>
> >
> > There is no performance problem if MQ variables are defined in <style> in
> > <head> on every page. Is that a good compromise?
> >
> It might have to be. Navigation controller (a.k.a., Event Workers) are
> heading in the same direction (insert inline).
>

I agree, for the lack of a better solution. Same applies to `@viewport` and
viewport dimension based preloading (picture, srcset, media specific
stylesheets).

A major downside of inlining is that with CSP, it will be off by default
(and a security risk if opted-in to). We have nonces to overcome that, but
they hard to deploy (need to change a secret for every page load). I'm
hoping hashes will land soon, allowing to statically authorize some inline
styles, without opening the doors for all style based XSS.

Received on Tuesday, 17 September 2013 14:45:53 UTC