The `of S` syntax in CSS `:nth-child()` allows you to prefilter elements before the nth-child counting logic applies. For example, `li:nth-child(even of :not([hidden]))` counts only visible list items when applying the even selector, ignoring hidden elements. This syntax also works with `:nth-last-child()`.

2m read timeFrom matuzo.at
Post cover image
2 Impressions