[@tailwindcss/upgrade] Don’t migrate inline style properties#19918
[@tailwindcss/upgrade] Don’t migrate inline style properties#19918dbpolito wants to merge 2 commits intotailwindlabs:mainfrom
Conversation
- treat inline style attributes as unsafe migration contexts - avoid misclassifying CSS property names like flex-grow and flex-shrink - add regression coverage for inline style attribute cases
- skip inline style attribute values before candidate parsing - prevent CSS property names like flex-grow from being treated as utilities - keep template migration safety checks focused on actual class-like content
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughTwo files in the Tailwind CSS upgrade codemod package were modified to handle inline style attributes. The test file received two new test cases validating that inline 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
Prevent the upgrade tool from rewriting CSS properties inside inline
styleattributes.This fixes cases like
style="flex-grow: 1"being changed tostyle="grow: 1"and adds regression tests.