W3C home > Mailing lists > Public > public-css-testsuite@w3.org > July 2005

Re: CSS Selectors test 146a/b

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sun, 03 Jul 2005 23:46:54 +0200
To: Allan Sandfeld Jensen <kde@carewolf.com>
Cc: public-css-testsuite@w3.org
Message-ID: <42d15afe.465899234@smtp.bjoern.hoehrmann.de>

* 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 · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Sunday, 3 July 2005 21:47:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 20 September 2010 17:51:54 GMT