VS Code plugin to sort CSS rules content with specified order. Powered by postcss-sorting.
Now works only with CSS and SCSS. Waiting support for Less.
To install, press F1
and select Extensions: Install Extensions
and then search for and select postcss-sorting
.
Press F1
and run the command named PostCSS Sorting
.
For changes keyboard shortcuts, create a new rule in File -> Preferences -> Keyboard Shortcuts
:
{
"key": "ctrl+shift+c",
"command": "PostCSSSorting.processEditor"
}
You can override the default and user settings for individual projects. Just add an PostCSSSorting
object to the settings.json
file.
For example:
{
"PostCSSSorting": {
"sort-order": ["padding", "margin"],
"sort-on-save": true
}
}
See the postcss-sorting documentation for all rules and predefined configs.
See the Releases section of our GitHub project for changelogs for each release version.
This software is released under the terms of the MIT license.