Calculate the specificity of a CSS selector
CoffeeScript JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
benchmark
spec
.gitignore
.npmignore
.travis.yml
LICENSE.md
README.md
appveyor.yml
index.js
package.json

README.md

Clear cut

OS X Build Status Windows Build Status Dependency Status

Calculate the specificity of a CSS selector

Using

npm install clear-cut
{specificity} = require 'clear-cut'
specificity('body') # 1
specificity('#footer') # 100
specificity('.error.message') # 20

Developing

git clone https://github.com/atom/clear-cut.git
cd clear-cut
npm install
npm test