node package manager


1. Introduction


Please report issues on [Github] (

For feedback, suggestions, etc. write to

2. Installation

2.1. Prerequisites

  • for command line use: Linux / Mac OS X / any OS with working Node.js

2.2. Install using git


To install:

  • run git clone git://

2.3. Install using npm


To install (global):

  • run npm install cssc -g

To update:

  • run npm update cssc

To uninstall:

  • run npm uninstall cssc

3. Usage

3.1. From the command line

Run bin/cssc (when installed from git), you will need to have nodejs 0.4.x or newer installed —

Run cssc (when installed from npm).


    shows usage information
cssc <filename>
    counts CSS tokens in <filename> and outputs the result to stdout
cssc <in_filename> <out_filename>
cssc -i <in_filename> -o <out_filename>
cssc --input <in_filename> --output <out_filename>
    counts CSS tokens in <in_filename> and outputs the result to <out_filename>
cssc -h
cssc --help
    shows usage information
cssc -v
cssc --version
    shows the version number


$ echo ".foo { p: v } .foo, .bar + .car { p: v }" > test.css
$ cssc test.css
Total selector groups: 2
Total simple selectors: 3
Total unique simple selectors: 2

4. Statistics (in a nutshell)

Sample CSS:

.foo {
    p: v
.foo, .bar + .car {
    p: v


  • .foo and .bar + .car are so called simple selectors;
  • .bar + .car is selector group.

So in resulting statistics you will see:

  • 2 selector groups — .foo and .foo, .bar + .car;
  • 3 simple selectors — .foo, .foo and .foo, .bar + .car;
  • 2 unique simple selectors — .foo and .bar + .car.

5. Authors

6. And finally

  • CSSC is licensed under MIT