Skip to content
CSS coding style formatter
Branch: dev
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Some prepares Aug 3, 2013
config Align prefix spacing #507 Jun 12, 2017
doc Add new --tty-mode option for cli May 12, 2017
scripts Update babel dependencies Jul 27, 2016
src Update core.js Jun 27, 2017
test fix endless loop with empty files Mar 23, 2017
.gitignore Revert "[tools] Add csscomb-core & .idea to .gitignore" Jul 11, 2016
.jscs.json Refactor Jul 11, 2016
.travis.yml [tools] Update Travis config Feb 8, 2017 Fix markdown Aug 7, 2017
LICENSE License Sep 5, 2013
logo.png Readme: logo added Sep 11, 2013

CSScomb CSSComb

Build Status NPM version Dependency Status devDependency Status

CSScomb is a coding style formatter for CSS. You can easily write your own configuration to make your style sheets beautiful and consistent.

The main feature is sorting properties in a specific order. It was inspired by @miripiruni's PHP-based tool of the same name. This is the new JavaScript version, based on the powerful CSS parser Gonzales PE.

1. Install

Global installation (for use as a command-line tool):

npm install csscomb -g

Local installation (for use as a command-line tool within current directory):

npm install csscomb

To install as a project dependency (the package will appear in your dependencies):

npm install csscomb --save

To install as a dev dependency (the package will appear in your devDependencies):

npm install csscomb --save-dev

2. Configure

There are a number of ways to configure CSScomb:

  • Use one of predefined configs
  • Put .csscomb.json file in the project root.
  • Set path to config's file
  • Use *.css file as a template

3. Use

Command Line

csscomb assets/css

Node.js module

var Comb = require('csscomb');
var comb = new Comb('zen');

4. Contribute

This project is actively mantained. But anyone and everyone is welcome to contribute. Please take a moment to review the guidelines for contributing.

Also you can become a mantainer. To do that please ping @tonyganch.


@mishanga, @tonyganch

Thanks for assistance and contributions:

@miripiruni, @anton-rudeshko, @cvrebert, @filtercake, @ignovak, @kizu, @lefoy, @L0stSoul, @mishaberezin, @puzankov, @schneyra, @thejameskyle, @vecmezoni


This software is released under the terms of the MIT license.

Other projects

You can’t perform that action at this time.