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

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 UTC