0.1.3 • Published 9 years ago

rework-clone v0.1.3

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

rework-clone

NPM version Build status devDependency status peerDependency status

This module clones properties from one rule set to another, unlike rework-inherit (rework.extend()) which concatenates the selectors.

Don’t copy anything and everything! Think when you need to inherit and when to clone.

Example

.a {
  background: red
}
.b {
  clone: .a;
}

yields:

.a {
  background: red;
}
.b {
  background: red;
}

Usage

var clone = require('rework-clone');

var css = rework(inputCSS)
  .use(clone(options))
  .toString();

Options

This is only one option: regexp to replace.

var css = rework(inputCSS)
  .use(clone({regexp: /^foo?$/}))
  .toString();

It will work with all foo properties.

License

MIT

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

10 years ago

0.0.0

11 years ago