Skip to content

straweb/CssSorterVS

 
 

Repository files navigation

CSS Sorter

Build status

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.

Features

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

About

A Visual Studio extension

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%