Search code examples
cssvisual-studio-codeconfigurationformatprettier

VSCode Prettier not formatting CSS


I am using the Prettier 5.1.3 extension in VSCode for Windows. It works very good with html but it doesn't work with css pages. I even reinstalled the whole VSCode, delete all settings files, reinstalled Prettier, enable "format on save" and set Prettier as default formatter but doesn't work. I noticed for html files if I run the Command Palette and look for "format" or if I click anywhere in the html file, I can see the options "Format Document" and "Format Document with", but in the css pages I can only see "Format Document" and it does nothing.

I would like to keep my VSCode as simpler as possible, without more extensions, that's why I'm trying to figure out how to set up Prettier to format CSS, since I have seen videos and examples where it works.

Thank you in advance for your help! =)


Solution

  • try installing vscode-css-formatter extension. It just adds the functionality to format .