css-isolate
Version:
Isolate CSS declaration differences between 2 files/strings within the context of their rules in order to produce a set of overrides
44 lines (24 loc) • 1.06 kB
Markdown
> Isolate CSS declaration differences between 2 files/strings within the context of their rules in order to produce a set of overrides. Useful for creating themes.
Install the module with: `npm install css-isolate`
```js
var cssIsolate = require('css-isolate');
var s1 = '.a { color: blue; font-size: 12px; }';
var s2 = '.a { color: red; font-size: 12px; }';
cssIsolate.diff(s1,s2); //'.a{color:red;}'
```
Install with cli command
```sh
$ npm install -g css-isolate
$ cssIsolate main.css main-variant.css > variant-overrides.css
```
_(Coming soon)_
_(Coming soon)_
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com).
Copyright (c) 2014 Matt Motherway
Licensed under the MIT license.