Is there a tool to alphabetize CSS definitions in Visual Studio?

Ben's answer is correct but is error prone but lead me to this plugin: https://github.com/mrmlnc/vscode-postcss-sorting Simply add this to your settings.json after installing,

"postcssSorting.config": {
  "properties-order": "alphabetical"
}

Then in the vscode command panel (cmd+shift+p) choose PostCSS Sorting: Run

There's lot of other great config options too including how to handle comments.


I don't know of anything in visual studio, but there online tools to clean up and format css. I've used CleanCSS with success

Update:

Try this one Format CSS Online. It seems to output the lines more like you want