You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See the example above. I am not sure why the "Tidy" button isn't working there, but if I format this locally, this issue occurs.
The text was updated successfully, but these errors were encountered:
sboerrigter
changed the title
Classes with custom variable names are not sorted correctly
Classes with custom variable names are not sorted
Apr 9, 2025
Hello @sboerrigter,
I had the same issue. Turns out that with Tailwind CSS v4, you need to add this option to your Prettier config so that Prettier knows where to find your Tailwind configuration stylesheet:
Hello @sboerrigter, I had the same issue. Turns out that with Tailwind CSS v4, you need to add this option to your Prettier config so that Prettier knows where to find your Tailwind configuration stylesheet:
What version of
prettier-plugin-tailwindcss
are you using?0.6.11
What version of Tailwind CSS are you using?
4.1.3
What version of Node.js are you using?
v23.6.1
What package manager are you using?
npm
What operating system are you using?
macOS
Reproduction URL
https://play.tailwindcss.com/DPP55XQUZZ
Describe your issue
Tailwind with custom variable names are not sorted correctly. For example, if the following color variable is defined:
Classes containing
-primary-600
are moved to the front of the list. So this:Becomes this:
See the example above. I am not sure why the "Tidy" button isn't working there, but if I format this locally, this issue occurs.
The text was updated successfully, but these errors were encountered: