NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #1992 most downloaded on npm
Merge CSS rules with PostCSS.
Latest stable
9.1.5
Last release 1 months ago
12 Oct 2026
Release timing varies
gaps range from 8 days to 4 months
Nearly every release is documented
notes for 56 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
106 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
Since version 4 has been in-development for some time, we thought it would be best to release an alpha version so that we could catch any issues befor
Since version 4 has been in-development for some time, we thought it would be best to release an alpha version so that we could catch any issues before the actual release.
cssnano & its plugins have been upgraded to PostCSS 6.x. Please ensure that for optimal results that you use cssnano with a PostCSS 6 compatible runner & that any other plugins are also using PostCSS 6.
cssnano is now essentially a preset loader and does not contain any built-in
transforms (instead, it delegates to cssnano-preset-default by default).
Due to the new architecture, it's not possible to exclude asynchronous
transforms and run it synchronously, unlike in 3.x. Any transforms that
were "core" modules have now been extracted out into separate packages.
Because of the new preset system, cssnano will not accept any transformation options; these must be set in the preset. The option names remain mostly the same, except some cases where "core" modules have been extracted out:
core is now normalizeWhitespace.reduceBackgroundRepeat is now normalizeRepeatStyle.reduceDisplayValues is now normalizeDisplayValues.reducePositions is now normalizePositions.reduceTimingFunctions is now normalizeTimingFunctions.styleCache is now rawCache.When excluding transforms, we now have an exclude option (in 3.x this was
named disable). Similarly, the safe option was removed; the defaults
are now much less aggressive.
By default, the following transforms are no longer applied to any input CSS. You may see an increased output file size as a result:
autoprefixerpostcss-discard-unusedpostcss-merge-identspostcss-reduce-identspostcss-zindexNote that you can load cssnano-preset-advanced instead which does contain
these transforms.
We no longer detect previous plugins to silently exclude our own, and now
consider this to be an anti-pattern. So postcss-filter-plugins was removed.
We also changed some options to make the default transforms safer:
postcss-minify-font-values: removeAfterKeyword set to false from true.postcss-normalize-url: stripWWW set to false from true.cssnano now does not accept the sourcemap shortcut option; please refer
to the PostCSS documentation on sourcemaps. The quickstart.js file included
with this module will give you a good starting point.
cssnano.process is no longer a custom method; we use the built-in process
method exposed on each PostCSS plugin. The new signature is
cssnano.process(css, postcssOpts, cssnanoOpts), in 3.x it was
cssnano.process(css, cssnanoOpts).
We dropped support for Node 0.12, now requiring at least Node 4.
Finally, cssnano is now developed as a monorepo, due to the fact that some
transforms have a lot of grey area/overlap. Due to this, some modules have
been refactored to delegate responsibility to others, such that duplication
of functionality is minimized. For instance, postcss-colormin will no
longer compress whitespace or compress numbers, as those are handled by
postcss-normalize-whitespace & postcss-convert-values respectively.
clone behaviour. In cases where some utility
has been used by several plugins it is now a separate package, reducing
cssnano's footprint.postcss-colormin &
postcss-reduce-initial were enhanced with different behaviour depending
on which browsers are passed. And now, the footprint for the caniuse-db
dependency is much smaller thanks to caniuse-lite - 7 times smaller as
of this writing. This makes cssnano much faster to download from npm!Your coding agent can read these notes before it upgrades. Set up the MCP server →
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fixes an issue where options were not passed to normalize-url.
Allow postcss-font-family to be disabled.
postcss-font-family to be disabled.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
cssnano can now be consumed with the parentheses-less method in PostCSS; e.g. postcss([ cssnano ]).
postcss([ cssnano ]).Extract trbl value reducing into a separate module.
ch units; previously they were removed.Add postcss-plugin keyword to package.json.
postcss-plugin keyword to package.json.Adds removal of outdated vendor prefixes based on browser support.
cssnano.process(css, opts) instead of cssnano(css, opts).Nothing published for this version
Nothing published for this version
Nothing published for this version
Fixes incorrect minification of border:none to border:0 0.
border:none to border:0 0.Improved selector minifying logic, leading to better compression of attribute selectors.
Fixes crash on undefined decl.before from prior AST.
decl.before from prior AST.Added support for bundling cssnano using webpack (thanks to @MoOx).
Nothing published for this version
Fixed a bug where a CSS function keyword inside its value would throw an error.
Better support for merging properties without the existance of a shorthand override.
Nothing published for this version
Now can merge identifiers such as @keyframes and @counter-style if they have duplicated properties but are named differently.
@keyframes and @counter-style if they
have duplicated properties but are named differently.Nothing published for this version
One column per quarter.