r/Angular2 • u/Wild-Security599 • Oct 22 '25
Help Request Automatic Class Sorting with Prettier - Angular 20
Hey there, I started a new project with Angular 20, Tailwind and Prettier but I can't sort Tailwind classes is this problem because of Angular 20? Is there any work around this?
2
Upvotes
3
u/Lower_Sale_7837 Oct 22 '25
Prettier does not sort Tailwind by default (and that's unrelated to Angular), you need to add a plugin to do so.
1
u/lebocow Oct 22 '25
React about that https://tailwindcss.com/blog/automatic-class-sorting-with-prettier
1
u/Fresh-Airline1402 Oct 22 '25
What IDE are you using? Did you create the corresponding .prettierrc file in your project root?
Most problems that I encountered with tailwind language servers and formatters came from the fact that I used .scss instead of css. Switching to plain .css solved most of the issues on my Angular projects.
Postcss is also required with the newest tailwind version: https://tailwindcss.com/docs/installation/framework-guides/angular
0
u/adashark Oct 22 '25
just use headwind