0.0.21 • Published 6 years ago

stylesheet-differ v0.0.21

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

6 years ago

0.0.20

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago