Closed jashaj closed 9 months ago
Prettier has better access to class order under the hood. it natively calls tailwindcss, and can access generate rules which has access to the actual rules. As far as im understanding, these come from the compiler that has access to the classes which are actually used. Currently, this one is guessing the order that they appear in, so it's not as narrowed down unfortunately.
Ultimately, though, i think that we opt to put the custom ones in the back and they opt to push it into the front.
I'd love if we could call the tailwindcss executable and get the generated rules as JSON via the CLI or something, but I'd have to add that to the tailwind library and im super unfamiliar with how it works structurally.
Thanks for the explanation and sorry for the late response. I'll close this issue as it seems to be a huge effort while prettier can also format my code on save.
Tailwind classes are ordered differently in Vue files when I format with this plugin compared to running prettier. What's causing the difference?
Tailwind formatter:
Prettier:
Versions:
.prettierrc.json:
Moving the contents of
.prettier.json
to thepackage.json
did not fix the issue.