- From: fantasai <fantasai.lists@inkedblade.net>
- Date: Fri, 20 Apr 2012 17:03:27 -0700
- To: "www-style@w3.org" <www-style@w3.org>
On 04/20/2012 04:16 PM, Tab Atkins Jr. wrote: > On Fri, Apr 20, 2012 at 3:04 PM, fantasai<fantasai.lists@inkedblade.net> 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.) > > Note that we already have a "zero or more of these, in order" pattern: > > a? b? c? > > It's just that implementing a "one or more of these, in order" pattern > requires some confusing grammar contortions: > > [ > a b? c? > | > b c? > | > c > ] > > This is obviously ugly, confusing, and repetitive. > > However, the only place I know of that uses this pattern is the > radial-gradient() grammar. > ... > So anyway, are there more places that would benefit from "one or more, > in this order" than radial-gradient()? Yes, I think I might wind up using it in one of the Text features, which is why I brought it up. (Haven't written up the appropriate emails yet, though. And maybe we wind up not doing that.) It would also simplify the grammar for 'border-image', could be used to make <bg-position> optional when <bg-size> is specified in 'background', and would have removed the first clause in the <position> syntax. ~fantasai
Received on Saturday, 21 April 2012 00:03:58 UTC