Re: Media Query Variables

On Mon, 16 Sep 2013 00:01:15 +0200, Kornel Lesiński <>  

> On Sun, 15 Sep 2013 22:51:49 +0100, Boris Zbarsky <>  
> wrote:
>> On 9/15/13 3:59 PM, Kornel Lesiński wrote:
>>> Media query variables don't require browser to block. They're basically
>>> event-based.
>> Media queries require you to block on knowing things like viewport size  
>> (possibly on a background thread) if you want to start downloads ASAP  
>> but not download the "wrong" things.
> The way I'm trying to spec that is that it will only delay fetching of  
> <picture> elements that depend on those particular properties, and not  
> block anything else. So loading of other images, parsing of rest of the  
> document, JS, etc. won't be blocked at all.
> The rule is basically: if during source selection algorithm you  
> encounter a media query that you can't evaluate yet, abort the algorithm  
> and retry it whenever conditions change (when you do layout in case of  
> viewport MQ in iframe, when MQ new vars are defined in case of async  
> CSS, etc.)
> The only way to make it any faster would be to spec something less  
> expressive that would make a bad choice instantly ;)

Or reduce the set of things that can't be evaluated yet.


Simon Pieters
Opera Software

Received on Monday, 16 September 2013 08:44:05 UTC