Open
Description
The current CCS 4 draft has :nth-child(An+B [of S]? )
, extending :nth-child(An+B)
The :nth-child(An+B [of S]? ) pseudo-class notation represents the An+Bth element that matches the selector list S among its inclusive siblings.
The CSS Syntax Module [CSS3SYN] defines the An+B notation. If S is omitted, it defaults to *.
By passing a selector argument, we can select the Nth element that matches that selector. For example, the following selector matches the first three “important” list items, denoted by the .important class:
:nth-child(-n+3 of li.important)