0.0.21 • Published 7 years ago

stylesheet-differ v0.0.21

Weekly downloads
2
License
GPL-3.0
Repository
github
Last release
7 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

7 years ago

0.0.20

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago