When the CSS file that Tailwind generates gets too big, PHPStorm will stop indexing it.
If the file isn't indexed, autocompletion won't work for CSS classes.
This problem is common when adding extra variants, or when using the @tailwindcss/ui
plugin.
If your CSS classes aren't being autocompleted, try opening the CSS file that Tailwind generates in your public/css/
directory.
You should see a yellow banner that says: "The file size (4.03 MB) exceeds configured limit (2.56 MB). Code insight features are not available".
If you see this yellow banner, you can fix the problem by doing the following:
Help > Edit Custom Properties...
idea.max.intellisense.filesize=6000
This custom property bumps the configured limit from the default 2500 KB to 6000 KB. After restarting your IDE, and after a few seconds of indexing, autocompletion should be working again.
Level up your Laravel deployments
If you aren't happy with your current deployment strategy for your Laravel apps, check out my premium deployment script.
Deploy with GitHub Actions
Deploy with GitLab CI/CD