Skip to content

fix(#4358): resolve parent selectors in comma-separated pseudo-selector lists#4408

Merged
matthew-dean merged 1 commit intoless:masterfrom
matthew-dean:fix/4358-selector-list-parent
Mar 9, 2026
Merged

fix(#4358): resolve parent selectors in comma-separated pseudo-selector lists#4408
matthew-dean merged 1 commit intoless:masterfrom
matthew-dean:fix/4358-selector-list-parent

Conversation

@matthew-dean
Copy link
Copy Markdown
Member

Summary

  • Fixes Nested pseudo-selector with parent symbol #4358 - & not replaced inside :not(&.a, &.b) and similar comma-separated pseudo-selector lists
  • When replaceParentSelector encounters a nested selector containing sub-Selectors (comma-separated list), it now processes each sub-Selector individually with recursive calls
  • Added test cases for :is() and :not() with single and multiple comma-separated parent selectors

Test plan

  • Added test cases for :is() and :not() with single and multiple comma-separated parent selectors
  • All existing selector tests pass
  • Full test suite passes

@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Mar 9, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 9, 2026

Warning

Rate limit exceeded

@matthew-dean has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 10 minutes and 24 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f71a1216-1eeb-46de-8c97-9830c42b3a47

📥 Commits

Reviewing files that changed from the base of the PR and between b9f67e7 and 7d06dee.

📒 Files selected for processing (3)
  • packages/less/src/less/tree/ruleset.js
  • packages/test-data/tests-unit/selectors/selectors.css
  • packages/test-data/tests-unit/selectors/selectors.less
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@matthew-dean matthew-dean merged commit daa3e00 into less:master Mar 9, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nested pseudo-selector with parent symbol

1 participant