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

Re: Deferring CSS load for unmatched Media Queries

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 4 Feb 2013 15:56:34 -0800
Message-ID: <CAAWBYDD6bDx3Z9FEeTj_27ABsWSca3-TWAg-vWeV2_VvL1xo7w@mail.gmail.com>
To: Yoav Weiss <yoav@yoav.ws>
Cc: www-style list <www-style@w3.org>
So, it sounds like you want to delineate three distinct categories of
stylesheets:

1. Essential stylesheets.  All current stylesheets are in this
category by default.  Essential stylesheets load eagerly, block script
execution during parsing, etc.
2. Low-priority stylesheets.  These are used on the page, but aren't
important to load quickly.  (That is, a FOUC is okay, or maybe you
won't add the elements that need the style until after you're sure the
style has loaded.)  To handle potential race issues with page script,
the OM for these stylesheets will be nulled until the author
explicitly requests them, even if the sheet has already loaded.
3. High-prio but optional stylesheets.  These are necessary early in
the page, but may not be used, due to MQs.  If the MQ for them is
false on page load, they shouldn't load at all until the MQ becomes
true.  I suspect these would have the same null OM until requested.

Is this accurate?

~TJ
Received on Monday, 4 February 2013 23:57:21 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:05 GMT