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

Re: [css3-conditional] alternate OR syntax

From: L. David Baron <dbaron@dbaron.org>
Date: Mon, 10 Oct 2011 11:48:22 -0700
To: Paul Irish <paul.irish@gmail.com>
Cc: www-style@w3.org
Message-ID: <20111010184822.GA23592@pickering.dbaron.org>
On Monday 2011-10-10 11:09 -0700, Paul Irish wrote:
> Secondly, on disjunction, I have a concern. I imagine much of the time
> authors will be using @supports for new properties, and as such they'll be
> vendor prefixed. This is illustrated in a spec example:
> 
> @supports ( box-shadow: 2px 2px 2px black ) or
>           ( -moz-box-shadow: 2px 2px 2px black ) or
>           ( -webkit-box-shadow: 2px 2px 2px black ) or
>           ( -o-box-shadow: 2px 2px 2px black ) {
>   ...
> }
> 
> Is it reasonable to assume that multiple rules within a pair of parens mean
> the same thing? So, instead, like so...
> 
> @supports ( box-shadow: 2px 2px 2px black; -moz-box-shadow: 2px 2px 2px
> black; -webkit-box-shadow: 2px 2px 2px black; -o-box-shadow: 2px 2px 2px
> black ) {
>   ...
> }
> 
> Without checking the spec, that's how I had assumed things had worked.

The problem here is that for many other use cases (i.e., things not
involving prefixes), authors are likely to be more interested in
'and' and might expect 'and' to be the default rather than 'or'.

Rather than violating expectations half the time (leading to
confusion when writing CSS and confusion when reading CSS written by
others), I think it's better to require an explicit 'and' or 'or'.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂
Received on Monday, 10 October 2011 18:48:47 GMT

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