- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Thu, 14 Jan 2010 18:01:08 -0600
- To: James Elmore <James.Elmore@cox.net>
- Cc: Alan Gresley <alan@css-class.com>, Niels Matthijs <niels.matthijs@internetarchitects.be>, Aryeh Gregor <Simetrical+w3c@gmail.com>, www-style list <www-style@w3.org>
On Thu, Jan 14, 2010 at 12:53 PM, James Elmore <James.Elmore@cox.net> wrote: > Does the specification for the (an+b) not include negative numbers? If I > remember correctly, (-1) selects the last child. (If I am wrong, sorry. I > will try to find time later today to check the spec and refresh my > memories.) Nope. Elements are numbered 1,2,3…. Numbers less than 1 match no elements at all. (This is useful, as it means you can select, say, the first 3 elements by using :nth-child(3-n) - it counts backwards from 3, and stops selecting anything after it drops below 1.) ~TJ
Received on Friday, 15 January 2010 00:02:01 UTC