W3C home > Mailing lists > Public > www-style@w3.org > November 2012

Re: nth descendent selector

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 13 Nov 2012 10:18:00 -0800
Message-ID: <CAAWBYDCjstVT54JQb25fdmj1KQed8yrHEFREs7Z06cr3=q=4Hg@mail.gmail.com>
To: Lea Verou <lea@w3.org>
Cc: Dave Smith <da__smith@hotmail.com>, www-style w3 <www-style@w3.org>
On Fri, Nov 9, 2012 at 12:14 PM, Lea Verou <lea@w3.org> wrote:
> Sounds like this would be solved by the :nth-match() pseudo-class [1] in
> Selectors 4. Specifically, the selector in your example would be
> li:nth-match(7 of li) or just :nth-match(7 of li).
>
> [1]: http://www.w3.org/TR/selectors4/#the-nth-match-pseudo

As Brian points out, this might not be quite right.  :nth-match()
selects the nth match *among siblings*, not across the document or
subtree.  It's just a more powerful :nth-of-type(), which is a more
powerful :nth-child().

~TJ
Received on Tuesday, 13 November 2012 18:19:03 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:02 GMT