[whatwg] The src-N proposal
Bruno Racineux
bruno at hexanet.net
Wed Nov 20 20:46:37 PST 2013
On 11/20/13 6:09 PM, "Kornel Lesiński" <kornel at geekhood.net> wrote:
>With preload scanner limitation definitions in <head> is the best we
>could
>possibly do. I have proposed Media Query Variables intended to be used in
>
><style> in <head> for responsive images.
>
>I've also wanted MQ variables to be usable in external stylesheets to
>reduce repetition in regular @media CSS, but even mere possibility of
>authors misusing external CSS definitions for responsive images (which
>would achieve centralization you want, but also get in the way of preload
>
>scanner) made browser vendors feel uneasy about this proposal.
But having custom MQs in the head (on the main thread if I understand
well), actually helps the preloader, and as such, creates a 2 fold
situation, where external misuse fears is also hurdle to the preloader.
Perhaps separating MQ variables and/or 'CSS constants' in a separate
css type is a way to go then... just a syntax for example sake:
<style text/x-cssvar>
media { mobile : (max-width: 400px) ; }
</style>
Since we'll use them for:
<link rel="stylesheet" href="/css/custom.css" media="('mobile')">
The text/cssvar type would logically belong to the head, above all other
css.
It helps mitigate those fears, and separate css custom variable
definitions from presentational css. i.e. You can't mix them up.
More information about the whatwg
mailing list