W3C home > Mailing lists > Public > www-style@w3.org > September 2013

Re: Media Query Variables

From: Simon Pieters <simonp@opera.com>
Date: Mon, 16 Sep 2013 10:43:32 +0200
To: www-style@w3.org, "Boris Zbarsky" <bzbarsky@mit.edu>, Kornel Lesiński <kornel@geekhood.net>
Message-ID: <op.w3hw6uztidj3kv@simons-macbook-pro.local>
On Mon, 16 Sep 2013 00:01:15 +0200, Kornel Lesiński <kornel@geekhood.net>  
wrote:

> On Sun, 15 Sep 2013 22:51:49 +0100, Boris Zbarsky <bzbarsky@mit.edu>  
> 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.

> https://github.com/ResponsiveImagesCG/picture-element/issues/62#issuecomment-24479164
>


-- 
Simon Pieters
Opera Software
Received on Monday, 16 September 2013 08:44:05 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:34 UTC