Plugin framework for CSS preprocessing in Node.js
JavaScript
2,736
341 commits
updated Jun 4, 2026
[!NOTE]
There have not been material changes to this package in 10 years. New changes and bug fixes are not planned. In the event of concrete security issues, changes may still occur. We recommend moving to something else more modern.
CSS manipulations built on css, allowing
you to automate vendor prefixing, create your own properties, inline images,
anything you can imagine!
Please refer to css for AST documentation
and to report parser/stringifier issues.
$ npm install rework
var rework = require('rework');
var pluginA = require('pluginA');
var pluginB = require('pluginB');
rework('body { font-size: 12px; }', { source: 'source.css' })
.use(pluginA)
.use(pluginB)
.toString({ sourcemap: true })
Accepts a CSS string and returns a new Rework instance. The options are
passed directly to css.parse.
Use the given plugin fn. A rework "plugin" is simply a function accepting the
stylesheet root node and the Rework instance.
Returns the string representation of the manipulated CSS. The options are
passed directly to css.stringify.
Unlike css.stringify, if you pass sourcemap: true a string will still be
returned, with the source map inlined. Also use sourcemapAsObject: true if
you want the css.stringify return value.
Rework has a rich collection of plugins and mixins. Browse all the Rework plugins available on npm.
Plugins of particular note:
calc() expressionsrgba(#fc0, .5)extend: selector support@import@import using node's module resolverheight: @widthurl()s with a given functionOverall
Maintained
Code review
npm
Latest release
Releases this year
3,074 followers · starred Oct 2013
2,306 followers · starred Apr 2014
2,263 followers · starred Jun 2014
5,323 followers · starred Aug 2013
Plugin framework for CSS preprocessing in Node.js
JavaScript
2,736
341 commits
updated Jun 4, 2026
[!NOTE]
There have not been material changes to this package in 10 years. New changes and bug fixes are not planned. In the event of concrete security issues, changes may still occur. We recommend moving to something else more modern.
CSS manipulations built on css, allowing
you to automate vendor prefixing, create your own properties, inline images,
anything you can imagine!
Please refer to css for AST documentation
and to report parser/stringifier issues.
$ npm install rework
var rework = require('rework');
var pluginA = require('pluginA');
var pluginB = require('pluginB');
rework('body { font-size: 12px; }', { source: 'source.css' })
.use(pluginA)
.use(pluginB)
.toString({ sourcemap: true })
Accepts a CSS string and returns a new Rework instance. The options are
passed directly to css.parse.
Use the given plugin fn. A rework "plugin" is simply a function accepting the
stylesheet root node and the Rework instance.
Returns the string representation of the manipulated CSS. The options are
passed directly to css.stringify.
Unlike css.stringify, if you pass sourcemap: true a string will still be
returned, with the source map inlined. Also use sourcemapAsObject: true if
you want the css.stringify return value.
Rework has a rich collection of plugins and mixins. Browse all the Rework plugins available on npm.
Plugins of particular note:
calc() expressionsrgba(#fc0, .5)extend: selector support@import@import using node's module resolverheight: @widthurl()s with a given functionOverall
Maintained
Code review
npm
Latest release
Releases this year
3,074 followers · starred Oct 2013
2,306 followers · starred Apr 2014
2,263 followers · starred Jun 2014
5,323 followers · starred Aug 2013