Skip to content
Post-process and compress CSS using clean-css.
Branch: master
Clone or download

Latest commit

Latest commit 823c04e Oct 13, 2019


Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Fix error when generating an external source map. Jan 31, 2018
.gitignore initial Sep 12, 2014
LICENSE Update LICENSE Sep 17, 2015 Update May 29, 2017
package.json Bump clean-css from 3.4.28 to 4.2.1 Oct 12, 2019

NPM version Dependencies


Compresses the css output from less using clean-css.

lessc usage

npm install -g less-plugin-clean-css

and then on the command line,

lessc file.less --clean-css="--s1 --advanced --compatibility=ie8"

See clean-css for the available command options - the only differences are advanced and rebase which we default to false, because it is not always entirely safe.

Programmatic usage

var LessPluginCleanCSS = require('less-plugin-clean-css'),
    cleanCSSPlugin = new LessPluginCleanCSS({advanced: true});
less.render(lessString, { plugins: [cleanCSSPlugin] })

Browser usage

Browser usage is not supported at this time.

You can’t perform that action at this time.