zachleat@zachleat.com’s Mastodon Archive

♻️ Reblog of Jen Kramer (jen4web@mastodon.social)

has() was a forgiving selector. After an issue was reported that the forgiving nature conflicts with jQuery when :has() contains a complex selector, the W3C landed on a resolution to make :has() an “unforgiving” selector just a few weeks ago.

:is() and :where() are still forgiving - meaning that it evaluates each selector in its list individually, ignoring what's invalid.

:has() will now ignore the entire list if one selector is invalid.

css-tricks.com/has-is-an-unfor