Re: [css3-conditional] alternate OR syntax

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 UTC