Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ensure :has selectors followed by other selectors match #13824

Merged
merged 1 commit into from
Oct 23, 2024
Merged

Commits on Oct 23, 2024

  1. fix: ensure :has selectors followed by other selectors match

    I resisted this previously because it felt a bit wasteful, but I now think that there's really no way around this: Instead of only going upwards the tree while matching, for `:has` we go _down_ the tree to see what matches. More specifically, we're collecting the children of the current element and then check if one of those does match the selectors inside `:has`.
    
    This makes the way the code works easier to reason about and also removes some boolean tracking we had to add for the previous approach.
    
    Fixes #13779
    dummdidumm committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    a809603 View commit details
    Browse the repository at this point in the history