0.0.21 • Published 8 years ago

stylesheet-differ v0.0.21

Weekly downloads
2
License
GPL-3.0
Repository
github
Last release
8 years ago

stylesheet-differ

CircleCI npm

stylesheet-differ is a npm module that outputs the difference of two stylesheets as valid css.

It works on small and large stylesheets alike, and powers the diffing capabilities of StyleURL.

Generally speaking, it's a wrapper on top of cssobj with some hacks to generate styles.

Removed rules and attributes result in attr: unset in the output.

Usage

import differ from 'stylesheet-differ'

const styleA = `body {
  color: blue;
  background-color: red;
}`;

const styleB = `body {
  color: red;
}`

const changes = differ(styleA, styleB);

//  body {
//    color: red;
//    background-color: unset;
//  }
0.0.21

8 years ago

0.0.20

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago