Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support :nth-child(An+B of S) #76

Open
redapple opened this issue Mar 15, 2017 · 1 comment · May be fixed by #120
Open

Support :nth-child(An+B of S) #76

redapple opened this issue Mar 15, 2017 · 1 comment · May be fixed by #120

Comments

@redapple
Copy link
Contributor

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)

@redapple
Copy link
Contributor Author

:nth-child(An+B [of S]? ) seems to have replaced :nth-match(An+B of <selector>) found in earlier versions of CSS4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant