You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 853B

12345678910111213141516171819202122232425262728293031323334
  1. # css-rules [![Build Status](https://travis-ci.org/jonkemp/css-rules.svg?branch=master)](https://travis-ci.org/jonkemp/css-rules) [![Coverage Status](https://coveralls.io/repos/jonkemp/css-rules/badge.svg?branch=master&service=github)](https://coveralls.io/github/jonkemp/css-rules?branch=master)
  2. [![NPM](https://nodei.co/npm/css-rules.png?downloads=true)](https://nodei.co/npm/css-rules/)
  3. > Returns a parse tree for a CSS source.
  4. ## Install
  5. Install with [npm](https://npmjs.org/package/css-rules)
  6. ```
  7. npm install --save css-rules
  8. ```
  9. ## Usage
  10. ```js
  11. var parseCSS = require('css-rules');
  12. var rules = parseCSS(css);
  13. rules.forEach(function (rule) {
  14. console.log(rule[0]);
  15. console.log(rule[1]);
  16. });
  17. ```
  18. ## Credit
  19. The code for this module was originally taken from the [Juice](https://github.com/Automattic/juice) library.
  20. ## License
  21. MIT