- From: fantasai <fantasai.lists@inkedblade.net>
- Date: Sun, 09 Mar 2008 22:09:11 -0700
- To: www-style@w3.org
L. David Baron wrote:
> On Sunday 2008-03-09 12:10 -0700, fantasai wrote:
>> I would like to see it allowed everywhere *except* between "a" and "n",
>> i.e. (3 n+5) is illegal.
>
> That seems reasonable to me, except I'd also want to treat the sign
> of whichever number comes first as a sign (must be attached to the
> number) rather than an operator. In other words, even though
> :nth-child(n - 2) would be legal, I'd prefer than :nth-child(- 2)
> were not.
Agreed.
> I'd propose the following spec text to do that:
> # Whitespace is permitted after the "(", before the ")", and on
> # either side of a "+" or "-" that separates
+ the
> # <var>a</var><code>n</code> and <var>b</var> parts (when both are
> # not omitted).
s/both are not/neither is/
or
s/not omitted/present/
> #
> # Legal Examples:
> # :nth-child( 3n + 1 )
> # :nth-child( +3n - 2 )
> # :nth-child( -n+ 6)
> # :nth-child( +6 )
> # Illegal Examples:
> # :nth-child(3 n)
> # :nth-child(+ 2n)
> # :nth-child(+ 2)
~fantasai
Received on Monday, 10 March 2008 06:08:34 UTC