Re: CSS Selectors test 146a/b

* Allan Sandfeld Jensen wrote:
>> > I was debugging these tests to figure out why they failed in Konqueror
>> > when I discovered they used :nth-child(3n-1). According to CSS Selectors
>> > the b value cannot be negative, so it should be corrected to
>> >
>> > :nth-child(3n+2).
>> Why can't b be negative?
>Because the syntax is "an+b" with comments on special cases of a=0, b=0 and 
>negative a, but no mention of a special case of negative b. So if b was 
>negative and the syntax was maintained it would be "an+-b". 

The document notes "The a and b values must be zero, negative integers
or positive integers." and the grammar defines b as SIGNED_INTEGER which
is defined as [-+][0-9]+; "3n-1" matches the "expression" production.
The document could be clearer on this point though, negative values for
a and b are not all that well-understood.
Björn Höhrmann · ·
Weinh. Str. 22 · Telefon: +49(0)621/4309674 ·
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · 

Received on Sunday, 3 July 2005 21:47:04 UTC