Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the best tool to automatically organize or alphabetize your CSS properties? [closed]

Tags:

css

I'm looking for a way to automatically organize (alphabetically, or by any other accepted "standard") all of my CSS properties. I would prefer a method in Dreamweaver, but I'll take anything at this point!

Example:

.div-name {
padding: 5px;
width: 300px;
margin: 10px;
color: #000;
}

would be converted to:

.div-name {
color: #000;
margin: 10px;
padding: 5px;
width: 300px;
}
like image 366
Joshua Sortino Avatar asked Dec 30 '10 21:12

Joshua Sortino


2 Answers

There was formerly a tool called "CSScomb" (at csscomb.com) to sort and group your CSS. It had plugins for a wide variety of code editors.

Unfortunately, it is no longer online; the domain was for sale, and now it redirects to…something else.

There does appear to be an active repository here: https://github.com/csscomb/csscomb.js/

like image 75
Vladimir Starkov Avatar answered Sep 21 '22 15:09

Vladimir Starkov


Try this:

http://www.cleancss.com/

Haven't used it, but it appears to do what you say.

Bob

like image 33
rcravens Avatar answered Sep 21 '22 15:09

rcravens