Yes, try installing vscode-css-formatter extension.
It just adds the functionality to format .css files and the shortcut stays the same Alt+Shift+F.
Yes, try installing vscode-css-formatter extension.
It just adds the functionality to format .css files and the shortcut stays the same Alt+Shift+F.
Beautify css/sass/scss/less
to run this
enter alt+shift+f
or
press F1 or ctrl+shift+p
and then enter beautify ..

an another one - JS-CSS-HTML Formatter
i think both this extension uses js-beautify internally
Videos
» npm install vscode-css-formatter
Looking for some formatters for CSS
Quite sure you can do this with prettier code formatter plugin. And you can set format on save true for all languages by adding the following to your user settings json file(dont forget to reload vscode after updating) :
"editor.formatOnSave": true,
you can enable format on save for a specific language by adding the following too :
"[css]": {
"editor.formatOnSave": true
}
"[css][scss][less]": {
"editor.defaultFormatter": "vscode.css-language-features"
}
The JSON configuration you've provided appears to be related to Visual Studio Code (VSCode) settings for formatting CSS, SCSS, and LESS code. This configuration sets the default formatter for these languages to "vscode.css-language-features."
Here's what this configuration does:
"editor.defaultFormatter": This setting in VSCode allows you to specify the default code formatter for a particular language or file type.
"vscode.css-language-features": This value indicates that you want to use the built-in CSS language features of VSCode as the default formatter for CSS, SCSS, and LESS files.
In simpler terms, when you open or edit CSS, SCSS, or LESS files in VSCode, it will use its own internal formatter for those languages by default.
You can customize your VSCode settings by adding or modifying settings in your settings.json file to tailor your development environment to your preferences. This particular configuration is useful if you prefer to use the VSCode built-in formatter for CSS-related languages.
