Horrid formatting when using PostCSS imports with Prettier #2718
-
I have some custom styles so I separated them by files. My @import url('./base.css') @import url('./grid.css') /* Start purging... */ @tailwind components;
/* Stop purging. */
/* Write your own custom component styles here */
.btn-blue {
@apply px-4 py-2 font-bold text-white bg-blue-500 rounded;
}
/* Start purging... */
@tailwind utilities;
/* Stop purging. */
/* Your own custom utilities */ Note the horrid formatting above. I have installed related extensions but it always gives horrid formatting. Is there anyway to get it nicely formatted on Save? I'm using VSCode :) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hello! You can install a PostCSS language extension to vscode and set your index.css file to use the |
Beta Was this translation helpful? Give feedback.
-
Solved it 🤦♂️ I forgot to use Horrible, lost so much time on this 🤣 |
Beta Was this translation helpful? Give feedback.
Solved it 🤦♂️
I forgot to use
;
in CSS as I don't use them in JS 😂Horrible, lost so much time on this 🤣