node package manager
Stop writing boring code. Discover, share, and reuse within your team. Create a free org »

css-rules

css-rules Build Status Coverage Status

NPM

Returns a parse tree for a CSS source.

Install

Install with npm

npm install --save css-rules

Usage

var parseCSS = require('css-rules');
 
var rules = parseCSS(css);
 
rules.forEach(function (rule) {
    console.log(rule[0]);
    console.log(rule[1]);
});

Credit

The code for this module was originally taken from the Juice library.

License

MIT