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

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 UTC