Skip to content

Conversation

dtdesign
Copy link

@dtdesign dtdesign commented Apr 7, 2025

The previous fix for :not() in 3433c7d was incomplete because it only considered :hover as a standalone selector but missed the ability to combine it with other selectors like :not(.some-class:hover), yielding an infinite loop once again.

The same problem exists for :has() and since it follows the same semantics, I went ahead and unified the approach for both pseudo selectors. For complex selectors the :not() or :has() is not the immediate parent, requiring a recursive lookup to identify any such selectors.

Fixes #35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Infinite loop when using :hover inside :has() condition
1 participant