W3C home > Mailing lists > Public > www-style@w3.org > March 2015

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

From: fantasai <fantasai.lists@inkedblade.net>
Date: Thu, 19 Mar 2015 16:00:25 -0700
Message-ID: <550B5509.6090202@inkedblade.net>
To: www-style@w3.org
On 01/15/2015 07:38 PM, Bjoern Hoehrmann wrote:
> * 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>) ]? ;
>> ```
>
> If I am not mistaken, that would not really be at the end, and I am not
> thrilled about
>
>    @import url(...) a, b supports(...);
>    @import url(...) supports(...) a, b;
>
> since white space usually binds more tightly than the comma, so it looks
> as though `supports` binds to the `b` in the first example and to `a` in
> the second example. Also
>
>    @import url(...) not screen supports(...);
>
> seems awkward at first glance, and people might then be tempted to write
>
>    @import url(...) not supports(...);
>
> which looks plausible but does not seem supported by the proposal.

I think this is a fair point. Do you have an alternate suggestion for syntax?

~fantasai
Received on Thursday, 19 March 2015 23:00:56 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:30 UTC