Re: [css-cascade] Allowing @import to be conditional on @supports queries

On Thursday 2015-01-15 16:35 -0800, Tab Atkins Jr. wrote:
> I propose that we allow this by adding a
> "supports(<supports-condition>)" function to the end @import grammar,
> like:
> 
> ```
> @import [ <url> | <string> ] [ <media-query-list> ||
> supports(<supports-condition>) ]? ;
> ```
> 
> In other words, you can supply a media condition and/or a supports
> condition.  If we add more conditional rules, we can add more to this
> clause as well.

Sounds good.

Previously discussed in
https://lists.w3.org/Archives/Public/www-style/2011Jun/0329.html
and deferred to level 4 in:
https://lists.w3.org/Archives/Public/www-style/2012Oct/0275.html

Presumably we'd want to have a requirement that UAs actually *not*
load the sheets through such a supports-query when it fails to
match?  (Also, CSSImportRule.styleSheet MUST be null, even if the
sheet is loaded through some other link.)

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                          https://www.mozilla.org/   𝄂
             Before I built a wall I'd ask to know
             What I was walling in or walling out,
             And to whom I was like to give offense.
               - Robert Frost, Mending Wall (1914)

Received on Friday, 16 January 2015 00:47:43 UTC