Re:Conditional CSS with:has and:nth-last-child
by paavohtl on Wednesday May 17, 2023 @05:16PM
(#35981367)
Little nitpick, but :not() is not a new feature by most definitions of new. It has been in browsers for over a decade (closer to 15 in browsers not related to IE), which is an eternity in the world of web technology.
[ Parent
| on HN ]
Re:Conditional CSS with:has and:nth-last-child
by samwillis on Wednesday May 17, 2023 @05:32PM
(#35981514)
Correct, although :not() had a massive upgrade only a couple of years ago with complex selectors support.
Prior to the change you could only pass a "simple selector" that only matched against the one node, such as :not(.something).
However you can now do :not(ul > li p.something)