Atom editor plugin to sort CSS rules content with specified order.
$ apm install postcss-sorting
or open Atom and go to Preferences > Install and search for postcss-sorting
package.
You can select one of the bundled presets: default, csscomb, yandex and zen.
If any of the following config files exist, they will override the selected preset. They are loaded in the following order of priority:
-
.postcss-sorting.json
at the root of your project -
A
"postcssSortingConfig": { ... }
object in your projectpackage.json
-
Custom
~/path/to/your/config.json
(if specified in package settings) -
~/.postcss-sorting.json
(in yourHOME
directory)
Files can be processed "On Save" (not enabled by default).
Notifications can also be disabled from the package settings.
In a CSS or PostCSS file, open the Command Palette (Cmd + Shift + P (OS X), Ctrl + Shift + P (Windows/Linux)) and choose PostCSS Sorting: Run
.
Keyboard shortcut: Ctrl + Shift + S
If you have an "On Save" option enabled just save a file.
This plugin is based on the postcss-sorting plugin by Aleks Hudochenkov