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

[css3-conditional] @supports all (was Re: css-conditional suggestion)

From: L. David Baron <dbaron@dbaron.org>
Date: Tue, 27 Sep 2011 18:14:00 -0700
To: Nicholas Shanks <contact@nickshanks.com>
Cc: www-style@w3.org, Ian Hickson <ian@hixie.ch>
Message-ID: <20110928011400.GA17618@pickering.dbaron.org>
On Monday 2011-09-12 17:00 +0100, Nicholas Shanks wrote:
> I propose a new, optional, condition keyword: 'all', to be used thus:
> 
> @supports all {
>     .box {
>         display: inline-block;
>         box-spacing: even;
>     }
> }
> 
> Which is equivalent to the following:
> 
> @supports {
>     .box {
>         display: inline-block;
>         box-spacing: even;
>     }
> }

I'm more comfortable with the explicit "@supports all" variant than
I am with assuming that @supports with no argument is equivalent to
it.

However, I worry that by not asking authors to explicitly declare
what they require, we might be tempting them to unnecessarily create
more dependencies than they need.  This would increase the chance
that authors will accidentally write browser tests rather than
feature tests (by limiting things to the set of browsers they test
on and accidentally excluding others)

It also fits rather awkwardly with CSS's existing mechanisms for
ignoring things that are unsupported.  CSS has been careful to
define the scope of what an error invalidates (e.g., declaration,
rule, media query expression), and in general define things thus
invalidated to act as though they were not present.  When such
things go inside @supports all, this both breaks the mental model
that I hope authors develop of CSS's error handling and the model
that implementations use to implement it.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂
Received on Wednesday, 28 September 2011 01:14:49 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:44 GMT