W3C home > Mailing lists > Public > www-style@w3.org > October 2014

[selectors] Sp?ecificity of :nth-child() and :nth-last-child() with a selector list

From: Benjamin Poulain <bpoulain@apple.com>
Date: Fri, 31 Oct 2014 12:38:21 -0700
Message-Id: <1D637108-299B-4D99-A3F6-CA6F4EFC6461@apple.com>
To: www-style list <www-style@w3.org>
Hi,

Currently, :nth-child(An+B of selector) has the same specificity has :nth-child() (0, 1, 0).

Given the new definition of :nth-child(An+B of selector) must match selector on the current element, I believe it would make sense to include the specificity of the nested selector in the specificity of :nth-child() and :nth-last-child().

For example:
	:nth-child(odd of #WebKit)
would have (1, 1, 0).

Benjamin
Received on Friday, 31 October 2014 19:39:04 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:45 UTC