Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including cssnano with all npm packages installed. Try it out:

/* * This example targets Node 4 and up. */ const cssnano = require('cssnano'); /* * Add your CSS code here. */ const css = ` h1 { color: #ff0000; font-weight: bold; } `; /* * Add your configuration here; see and * for more details. * * For example you can turn off z-index rebasing by setting `zindex: false` * in your config, or you can use `safe: true` which will turn off unsafe * optimisations. */ const opts = { }; /* * Compress the CSS asynchronously and log it to the console. */ cssnano.process(css, opts).then(result => { console.log(result.css); });

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

cssnano v3.10.0

A modular minifier, built on top of the PostCSS ecosystem.


A modular minifier, built on top of the PostCSS ecosystem.

Build Status Build status Coverage Status NPM version Dependency Status ![Gitter]( Chat.svg)

cssnano is a modular minifier that aims to utilise small modules from the PostCSS ecosystem, rather than being an all-encompassing module that may be difficult to contribute to. Because it is written on top of PostCSS, it is able to do more than simple whitespace transforms - including advanced optimisations such as custom identifier reduction, z-index rebasing, and adjacent selector merging.

Note that cssnano enables aggressive optimisations by default, which might not always be what you want. Set to true if you want to disable this. In future versions, only safe options will be enabled by default, starting from version 4.

For further details check out the website:

You can now try cssnano online via Runkit!




Please help to support this project by purchasing a cssnano sticker.


MIT © Ben Briggs

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free