tailwindlabs / tailwindcss

A utility-first CSS framework for rapid UI development.
https://tailwindcss.com/
MIT License
83.28k stars 4.22k forks source link

Resolve imports from CSS file #15010

Closed RobinMalfait closed 6 days ago

RobinMalfait commented 1 week ago

This PR adds an improvement to the upgrade tool to make sure that if you pass a single CSS file, that the upgrade tool resolves all the imports in that file and processes them as well.

Test plan:

Created a project where index.css imports other.css. Another leave-me-alone.css is created to proof that this file is not changed. Running the upgrade guide using index.css also migrates other.css but not leave-me-alone.css.

Here is a video so you don't have to manually create it:

https://github.com/user-attachments/assets/20decf77-77d2-4a7c-8ff1-accb1c77f8c1