W3C home > Mailing lists > Public > www-style@w3.org > April 2012

RE: [css3-values] Order-sensitive "one or more" component value combinator

From: Arron Eicholz <Arron.Eicholz@microsoft.com>
Date: Fri, 20 Apr 2012 23:11:50 +0000
To: fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <180A6BAFC96CE3459AE871343399CB0F0D8DB916@CH1PRD0310MB380.namprd03.prod.outlook.com>
On Friday, April 20, 2012 3:05 PM fantasai wrote:
> 
> There's a few places where our grammars would be much simpler (less
> repetition) if we had a combinator that meant "this or that or both, but in this
> order".
> (We have the double-bar, which means "this or that or both", but there's no
> ordering requirement there.)
> 
> So I'm proposing we add one, and the best idea I could come up with was ??,
> e.g.
> 
>    property-name: <foo> ?? <bar>
> 
> Thoughts?
> 

I think the precedence here has been that a single identifier (e.g. |) identifies that the values must occur. So I think your solution to use double question marks (??) isn't accurate to the single identifier model. A solution might be to use a single ampersand (&). Also I would prefer not to use the question mark (?) because of its usage as a modifier (quantifier) for groupings.

Section 1.4.2.1 from CSS 2.1:
A bar (|) separates two or more alternatives: exactly one of them must occur. 
A double bar (||) separates two or more options: one or more of them must occur, in any order.
A double ampersand (&&) separates two or more components, all of which must occur, in any order.

--
Thanks,
Arron Eicholz
Received on Friday, 20 April 2012 23:13:06 GMT

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