-
Notifications
You must be signed in to change notification settings - Fork 756
Closed
Description
https://drafts.csswg.org/selectors-4/#the-nth-child-pseudo
"The An+B notation and its interpretation are defined in CSS Syntax 3 §6 The An+B microsyntax; it represents any index i = An + B for any positive integer n."
So e.g. 2n+1 would not match the 1st child.
The link is to
https://drafts.csswg.org/css-syntax-3/#anb-microsyntax
"The An+B notation defines an integer step (A) and offset (B), and represents the An+Bth elements in a list, for every positive integer or zero value of n, with the first element in the list having index 1 (not 0)."
The spec should mention the zero case (and probably also that the list is 1-indexed).
Metadata
Metadata
Assignees
Labels
No labels