Skip to content
| Marketplace
Sign in
Visual Studio>Tools>CSS Sorter
CSS Sorter

CSS Sorter

Mads Kristensen

|
12,230 installs
| (3) | Free
Sort CSS properties easily for better readibility and GZIP compression
Download

Sort CSS properties easily for better readibility and GZIP compression

See the change log for changes and road map.

Features

  • Sorts CSS properties
  • Uses CSS Declaration Sorter node module under the hood
  • How it works

Sort properties

This extension calls the CSS Declaration Sorter node module behind the scenes to perform the property sorting.

Invoke the command from the context menu in the CSS editor.

Context Menu

Example

This input:

Input

Becomes turns into this after sorting with the SMACSS sorting mode:

Output

How it works

The first time a .css file is opened in Visual Studio after installing this extension, the css-declaration-sorter npm package is being installed into %LocalAppData%\Temp\CSS Sorter. It can take up to a minute but usually not more. You have to be online for it to install.

When the npm package has been installed, the context menu button lights up in the CSS editor. When the button is clicked, a process is being started that calls the npm package using Node.js.

So make sure to have Node.js installed or the latest ASP.NET Web Development Tools for Visual Studio which includes Node.js.

Contribute

Check out the contribution guidelines if you want to contribute to this project.

For cloning and building this project yourself, make sure to install the Extensibility Tools 2015 extension for Visual Studio which enables some features used by this project.

License

Apache 2.0

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft