Skip to content

Conversation

@philipp-spiess
Copy link
Member

Fixes #16799

This was caused by a wrong condition in the CSS value parser that put child function arguments into the parent function by accident.

Test plan

  • Added a unit test to guard against regressions
  • Validated against the repro:
    Screenshot 2025-02-25 at 16 31 14
@philipp-spiess philipp-spiess requested a review from a team as a code owner February 25, 2025 15:33
@philipp-spiess philipp-spiess force-pushed the fix/selector-parser-bug branch from e1e0a58 to b575a6f Compare February 25, 2025 15:34
@philipp-spiess philipp-spiess force-pushed the fix/selector-parser-bug branch from b575a6f to 9fb7fdd Compare February 25, 2025 15:35
})

it('parses :not(:nth-child(1))', () => {
expect(parse('&:not(:nth-child(1))')).toEqual([
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is structurally identical to the :has(…) test above. Is it necessary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, good catch. Removed!

@philipp-spiess philipp-spiess merged commit b56f12e into main Feb 25, 2025
5 checks passed
@philipp-spiess philipp-spiess deleted the fix/selector-parser-bug branch February 25, 2025 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants