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

Re: CSS Selectors test 146a/b

From: Tantek Çelik <tantek@cs.stanford.edu>
Date: Wed, 06 Jul 2005 13:19:48 -0700
To: Bert Bos <bert@w3.org>, <public-css-testsuite@w3.org>
Message-ID: <BEF18375.5C6B8%tantek@cs.stanford.edu>

On 7/5/05 5:10 AM, "Bert Bos" <bert@w3.org> wrote:

> 
> On Sunday 03 July 2005 23:37, Allan Sandfeld Jensen wrote:
>> On Saturday 02 July 2005 16:58, Ian Hickson wrote:
>>> On Wed, 29 Jun 2005, 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".
>> 
>> Besides the negative values of b are redundant, so I expect the
>> exclusion of them to be deliberate.
> 
> There is definitely something unclear in the Selectors spec.
> 
> The spec says explicitly that b can be negative, but it doesn't say that
> the '+' then becomes a '-'. Which would indeed lead to '3n+-1'.

That's probably my fault.  I think I last edited that section.


> (I must 
> say that I overlooked negative b and only implemented[1] for b >= 0
> myself...)

I implemented both an+b and an-b in Tasman v0.9 which shipped a while ago in
MSN/MacOSX client, and later in Tasman 1.0 in Office2004/MacOSX.


> I think we intended for '3n-1' to be legal (as the test case indicates),
> but not '3n+-1'.

Yes.  And that's what I implemented too.


> I don't mind how we fix the spec, allow 'an-b' or not, but I think we
> should make it clear that '3n+-1' is *not* correct.

Yes.  Perhaps something to add to the test suite?

Thanks,

Tantek
Received on Wednesday, 6 July 2005 20:19:49 GMT

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