Download this extension from the Marketplace or get the CI build.
Sort CSS properties easily for better readibility and GZIP compression
See the change log for changes and road map.
- Sorts CSS properties
- Uses CSS Declaration Sorter node module under the hood
- How it works
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.
This input:
Becomes turns into this after sorting with the SMACSS sorting mode:
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.
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.