W3C home > Mailing lists > Public > public-respimg@w3.org > September 2013

Media Query Variables

From: Kornel Lesiński <kornel@geekhood.net>
Date: Tue, 17 Sep 2013 00:07:10 +0100
To: public-respimg@w3.org
Message-ID: <op.w3i058fjte2ec8@aimac.local>

To address concerns about verbosity and maintainability of Media Query  
breakpoints in <picture> I've proposed MQ Variables. There's a lengthy  
discussion about it on www-style:


I think there's a lot of support for the idea in general, but the  
controversial point is whether MQ variables should be allowed in external  

The problem is that when MQ variables are only defined in an external  
file, then browser won't know which <picture><source> to download before  
external CSS is downloaded, so this delays loading of responsive images.

There is no performance problem if MQ variables are defined in <style> in  
<head> on every page. Is that a good compromise?

There's also suggestion to use only <meta>-based syntax for MQ variables  
rather than CSS syntax to make it impossible to use MQ variables in  
external stylesheets at all, so developers who don't listen to performance  
best practices cannot shoot themselves in the foot. Can you all promise  
not to write slow pages, so that won't have to be done? ;)

regards, Kornel
Received on Monday, 16 September 2013 23:07:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:06:10 UTC