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

Re: Media Query Variables

From: Kornel Lesiński <kornel@geekhood.net>
Date: Sun, 15 Sep 2013 23:01:15 +0100
To: www-style@w3.org, "Boris Zbarsky" <bzbarsky@mit.edu>
Message-ID: <op.w3g3gdw5te2ec8@aimac.local>
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 ;)

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

-- 
regards, Kornel
Received on Sunday, 15 September 2013 22:02:05 UTC

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