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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 20 Mar 2015 10:52:24 -0700
Message-ID: <CAAWBYDAPXN-rLff1hUZ2DtYjSwcci6trDw6s+nrfRSFpxwMw5w@mail.gmail.com>
To: Florian Rivoal <florian@rivoal.net>
Cc: fantasai <fantasai.lists@inkedblade.net>, www-style list <www-style@w3.org>
On Fri, Mar 20, 2015 at 4:34 AM, Florian Rivoal <florian@rivoal.net> wrote:
> One of the downside of this is that it requires double parentheses in simple cases:
>
> @import "http://example.com/foo.css" supports((display:flex));
>
> It made sense to mandate the parentheses in the @support rule, but they seem overkill here, and is probably surprising for authors. We could do:
>
> @import <url> [ supports(<supports-condition> | <declaration>) ]? <media-query-list>? ;
>
> which would let you write:
>
> @import "http://example.com/foo.css" supports(display:flex);

I think fantasai brought this up as well.  I can go either way, though
I'll note that we explicitly rejected this for CSS.supports().

~TJ
Received on Friday, 20 March 2015 17:53:11 UTC

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