Tool for sorting CSS properties in specific order
- Sorting CSS properties: The order of properties in the help of professionals
- Setting the order of CSS properties: Use the order to which you are accustomed to
- Parsing CSS in the tags style tag, style attribute: CSScomb find a CSS-code to other languages and will sort it
- Formatting style sheets does not change: Work as a singleline and multiline CSS
- Separation of CSS properties for the group: Separate groups of empty string if you want
- Full support CSS2/CSS2.1/CSS3: CSScomb ready for the advanced CSS-code
The algorithm of CSScomb simulates web-technologist's actions upon working with CSS-code to the limit. Usually to re-order code you move lines over each other considering comments in the code, multilines records of property values, hacks and everything that could be found in the real file. CSScomb reproduces these actions for you. This means that the parser "thinks" as a person editing the text, not as a blind robot parsing CSS.
CSScomb is written in pure PHP, without any external libraries or dependencies. See details at wiki.
- Sublime Text 2 plugin avaliable in Package Control as 'CSScomb'
- TextMate plugin
- Coda Plugin
- Coda 2 Plugin
- Espresso 2 plugin (How to install)
- IntelliJIDEA Plugin
- WebStorm Plugin
- PyCharm plugin
- Notepad ++ Plugin
- Chocolat Mixin
- Vim Plugin
Avaliable at /build/cli/
% php csscomb.php CSSComb Command line tool for resort CSS code. SYNOPSIS $ php csscomb.php -s <file with JSON array> -i <path to input css file> -o <path to result css file> DESCRIPTION options: -s, --sort-order specify file with custom sort order. File must contain JSON data. For detail information run 'csscomb.php --help-sort-order' -i, --input must be directory name or file that needs to be sorted -o, --output sort result file. Use output when input is not a directory name, otherwise output param ignored. If output filename does not exist, the file is created. Otherwise, the existing file is overwritten. --help, -help, -h, -? or no options will print this man. EXAMPLE csscomb.php -s my-custom-sort-order.json -i css/style.css -o css/style-resorted.css EXAMPLE 2 csscomb.php -i some_directory_name