(no title)
Sinescape | 2 years ago
Suppose we want to style a list differently if it has five or more items. Since :has can detect any child element, the existence of a fifth item is a sufficient indicator that there are at least five items. So instead of ul:has(li:nth-last-child(n+5)), we could just use ul:has(li:nth-child(5)) which is quite a bit clearer in my opinion.
No comments yet.