Handle vendor-prefixed selector functions in custom variants - #20486
Handle vendor-prefixed selector functions in custom variants#20486OllieinCanada wants to merge 1 commit into
Conversation
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. WalkthroughThe selector parser now parses Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The vendor-prefixed custom-variant regression is covered by passing parser and compiler tests, so no actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fixes #20483.
What changed
:-moz-any()and:-webkit-any()arguments as selector lists, matching their standard:is()counterpart&inside these legacy selector functions@custom-variant firefox (:-moz-any(&))compilation pathWhy
The selector parser treated unknown function arguments as opaque values. After the nesting changes in #20124, that meant the
&inside:-moz-any(&)could not be replaced and the custom variant was emitted as a descendant selector instead.These two vendor-prefixed functions are legacy aliases for selector-list matching, so handling them alongside
:is()keeps the change narrowly scoped.Validation
main:.firefox\\:underline :-moz-any(:scope)vitest run packages/tailwindcss/src/index.test.ts packages/tailwindcss/src/selector-parser.test.ts— 299 tests passedtailwindcssproduction build passed, including ESM, CJS, and declaration output