NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #2004 most downloaded on npm
A modular CSS minifier, built on top of the PostCSS ecosystem.
Last release 9 days ago
08 Sep 2026
Release timing varies
gaps range from 8 days to 4 months
Nearly every release is documented
notes for 57 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
174 releases · first in 2015
refactor: replace natural sort with built-in array sort
refactor: remove getMatch function from cssnano-utils
refactor: remove getMatch function from cssnano-utils
The getMatch function allows nested arrays to emulate a map. It is better to replace this function with a regular Map(). It's unlikely this function is used outside of cssnano as it requires a very specific nested array struture.
fix: update postcss-calc to 8.2
Remove a crash when postcss-calc cannot parse the value
Updated dependencies
One column per quarter.
fix(cssnano): correctly resolve presets in pnpm monorepo
chore(postcss-normalize-url): reduce dependencies
fix(postcss-reduce-initial): update initial values data
c38f14c3ce3d0: postcss-normalize-url: avoid changing parameter encoding
postcss-merge-longhand: prevent crash in some situations (#1222) (83009a)
postcss-svgo: normalize SVG with escaped quote characters
postcss-svgo: normalize SVG with escaped quote characters (#1200) (4ef5e41)
postcss-convert-values: preserve percentage-only properties (#1212) (8f3453)
postcss-minify-gradients: handle 2 color-stop-length in linear gradient (#1215) (8bb7ba6c)
cssnano-preset-advanced: update autoprefixer (#1213) (f19932)
postcss-minify-gradients: remove extra dependencies (#1181) (50eb53)
cssnano: reduce dependencies by moving from cosmiconfig to lilconfig
postcss-normalize-url: bump normalize-url dependency to 6.0.1
postcss-normalize-url: bump normalize-url dependency to 6.0.1 (#1142) (b60f54bed)
postcss-ordered-values: preserve columns count (#1144) (9acd6a2fe3e)
Preserve alpha channel in color minification
postcss-colormin: Strict color parsing
Nothing published for this version
postcss-merge-longhand: mergeLonghand should not apply to CSS variables (#1057) (8aa64c7), closes #1051
Nothing published for this version
remove vulnerable dependency and always warn with bad SVG input #1034
If you use the cssnano JavaScript API, you need to change your code:
Replace cssnano.process() with cssnano().process() (notice the () after cssnano)
pass cssnano options to cssnano() instead of process()
cssnano(cssnanoOptions).process(postcssOptions)
@font-face declarations #726postcss-nested #1004translate3d() minification #920e #589, #984aspect-ratio #963@supports rules #974### Bug Fixes - update SVGO
Note: Version bump only for package cssnano
Note: Version bump only for package cssnano
postcss-ordered-values: columns transform returning string instead of the AST
postcss version is 8.2.1# 4.1.11 ## Bug Fixes * fix CVE-2021-28092
stylehacks does not throw error on [attr] selector
stylehacks does not throw error on [attr] selectorpostcss-colormin: increase performance
postcss-colormin: increase performancepostcss-discard-comments: increase performancepostcss-merge-rules increase performancepostcss-minify-params increase performancepostcss-minify-selectors: increase performancepostcss-normalize-display-values: increase performancepostcss-normalize-positions: increase performancepostcss-normalize-repeat-style: increase performancepostcss-normalize-string: increase performancepostcss-normalize-timing-functions: increase performancepostcss-normalize-whitespace: increase performancepostcss-ordered-values: increase performancepostcss-reduce-transforms: increase performancepostcss-svgo: increase performancepostcss-merge-longhand handle uppercase properties and valuespostcss-minify-gradients handle uppercase properties and valuespostcss-minify-params do break @page rulespostcss-reduce-idents handle uppercase at-rulespostcss-reduce-initial now uses repeat as initial value for mask-repeatpostcss-reduce-initial handle uppercase value when you convert to initialstylehacks handle uppercase properties and valuesinitial loading time (require('cssnano')).
require('cssnano')).postcss-merge-longhand correctly merging border properties with custom properties.republish cssnano due broken release.
cssnano due broken release.postcss-merge-longhand doesn't throw error when merge a border property.
postcss-merge-longhand doesn't throw error when merge a border property.cssnano now allow to toggling of plugins in presets using boolean configuration option.
cssnano now allow to toggling of plugins in presets using boolean configuration option.postcss-merge-longhand doesn't merge properties with unset.postcss-merge-longhand correctly merge borders with custom properties.postcss-merge-longhand doesn't merge redundant values if declarations are of different importance.postcss-calc updated to 7.0.0 version.css-declaration-sorter now use PostCSS 7
css-declaration-sorter now use PostCSS 7postcss-calc now use PostCSS 7postcss-minify-font-values now use PostCSS 7
postcss-minify-font-values now use PostCSS 7postcss-discard-duplicates now use PostCSS 7postcss-svgo now handle DataURI with uppercase data value (DATA:image/*;...)
postcss-svgo now handle DataURI with uppercase data value (DATA:image/*;...)postcss-svgo now handle DataURI with uppercase data value (DATA:image/*;...).css-declaration-sorter was removed from default prevent.
css-declaration-sorter was removed from default prevent.postcss-normalize-timing-functions doesn't lowercased property anymore.postcss-normalize-positons now handles uppercase properties.postcss-normalize-url now is case-insensitive.postcss-merge-idents now is case-insensitive.postcss-merge-rules now is case-insensitive.postcss-minify-selectors now is case-insensitive.postcss-minify-font-values now is case-insensitive.postcss-normalize-unicode now has correct dependencies.postcss-minify-params now has correct dependencies.cssnano-preset-advanced use Autoprefixer 9.postcss-merge-longhand doesn't mangle borders.
postcss-merge-longhand doesn't mangle borders.postcss-ordered-values support ordering animation values.postcss-merge-longhand now correctly merges borders with custom properties.
postcss-merge-longhand now correctly merges borders with custom properties.postcss-merge-longhand doesn't throw error in some border merge cases.postcss-merge-longhand don't drop border-width with custom property from border shorthand.
postcss-merge-longhand don't drop border-width with custom property from border shorthand.postcss-merge-longhand don't convert currentColor.postcss-merge-longhand don't merge border properties if there is a shorthand property between them.postcss-merge-longhand doesn't drop border-width with custom property from border shorthand.postcss-merge-longhand doesn't convert currentColor.postcss-merge-longhand doesn't merge border properties if there is a shorthand property between them.postcss-merge-longhand incorrect minification of border (border-*) declarations.
postcss-merge-longhand incorrect minification of border (border-*) declarations.postcss-merge-longhand don't explode declarations with custom properties.
postcss-merge-longhand don't explode declarations with custom properties.postcss-colormin now better transform to hsl.browserslist version incompatibility with caniuse-api
browserslist version incompatibility with caniuse-apiWe dropped support for Node 4, now requiring at least Node 6.9.
border-spacing property.U to lowercase for IE <= 11 and Edge <= 15.a { border-style:dotted; border-style:var(--variable) }) correctly.border property with invalid border width value correctly.:-ms-input-placeholder and ::-ms-input-placeholder selectors correctly.all property correctly.url function.data and *-extension:// URLs correctly.all for IE.Includes the new release candidate for postcss-selector-parser 3.
@media \0screen\,screen\9 {} hacks
(thanks to @evilebottnawi).resolveConfig for a Root node without a source property
(thanks to @darthmaim).cssnano: Resolved an issue with external configuration which wasn't being loaded correctly (thanks to @andyjansson).
@value syntax from css-modules to better integrate with css-loader.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!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
cssnano will no longer console.warn any messages when using deprecated options; these are now sent to PostCSS. You will be able to see them if you use…
console.warn any messages when using deprecated
options; these are now sent to PostCSS. You will be able to see them if you
use a PostCSS runner with built-in messages support, or alternately by
loading postcss-reporter or postcss-browser-reporter in your plugins list.grid identifier reduction by adding it to the list
of optimisations turned off when options.safe is set to true.unicode-range descriptors. Values will
be converted when the code matches 0 & f in the same place on both sides
of the range. So, u+2000-2fff can be converted to u+2???, but
u+2100-2fff will be left as it is.Resolves an integration issue with v3.9.0, where undefined values would attempt to be parsed.
v3.9.0, where undefined values
would attempt to be parsed.Your coding agent can read these notes before it upgrades. Set up the MCP server →