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 today
03 Oct 2026
Release timing varies
gaps range from 8 days to 4 months
Nearly every release is documented
notes for 59 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
181 releases · first in 2015
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.
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.Adds a new option to normalize wrapping quotes for strings & joining multiple-line strings into a single line. This optimisation can potentially reduc
Resolves an issue where display: list-item inline flow would be normalized to inline list-item rather than inline-list-item (thanks to @mattbasta).
display: list-item inline flow would be normalized
to inline list-item rather than inline-list-item (thanks to @mattbasta).Adds a quick start file for easy integration with Runkit. Try cssnano online at https://runkit.com/npm/cssnano.
Adds support for normalizing multiple values for the display property. For example block flow can be simplified to block.
display property. For
example block flow can be simplified to block.Further improves CSS mixin handling; semicolons will no longer be stripped from _rules_ as well as declarations.
Resolves an issue where the semicolon was being incorrectly stripped from CSS mixins.
Resolves an issue where the safe flag was not being persisted across multiple files (thanks to @techmatt101).
safe flag was not being persisted across
multiple files (thanks to @techmatt101).Improves performance of the reducePositions transform by testing against hasOwnProperty instead of using an array of object keys.
hasOwnProperty instead of using an array of object keys.indexes-of dependency.Unpins postcss-filter-plugins from 2.0.0 as a fix has landed in the new version of uniqid.
2.0.0 as a fix has landed in the new
version of uniqid.Temporarily pins postcss-filter-plugins to version 2.0.0 in order to mitigate an issue with uniqid 3.0.0.
2.0.0 in order to
mitigate an issue with uniqid 3.0.0.Enabling safe mode now turns off both postcss-merge-idents & postcss-normalize-url's stripWWW option.
stripWWW option.Added: Reduce background-repeat definitions; works with both this property & the background shorthand, and aims to compress the extended two value syn
background-repeat definitions; works with both this property
& the background shorthand, and aims to compress the extended two value
syntax into the single value syntax.initial values for properties when the actual initial value
is shorter; for example, min-width: initial becomes min-width: 0.Fixed an issue where cssnano would crash on steps(1).
steps(1).Fixed an issue where cssnano would crash on steps functions with a single argument.
steps functions with a
single argument.Added postcss-discard-overridden to safely discard overridden rules with the same identifier (thanks to @Justineo).
postcss-discard-overridden to safely discard overridden rules with
the same identifier (thanks to @Justineo).cubic-bezier
functions that are equivalent to the timing keywords and compresses, as well
as normalizing the steps timing function.perspective-origin property to the list of supported properties
transformed by the reduce-positions transform.Resolves an issue where the 3 or 4 value syntax for background-position were being incorrectly converted.
background-position
were being incorrectly converted.Improves checking for background-position values in the background shorthand property.
background-position values in the background
shorthand property.Adds a new optimisation path which can minimise keyword values for background-position and the background shorthand.
background-position and the background shorthand.core module, now performs less AST passes.Adds a new optimisation path which can minimise gradient parameters automatically.
Fixes an issue where using options.safe threw an error when cssnano was not used as part of a PostCSS instance, but standalone (such as in modules lik
options.safe threw an error when cssnano was
not used as part of a PostCSS instance, but standalone (such as in modules
like gulp-cssnano). cssnano now renames safe internally to isSafe.Unpins postcss-colormin from 2.1.2, as the 2.1.3 & 2.1.4 patches had optimization regressions that are now resolved in 2.1.5.
2.1.2, as the 2.1.3 & 2.1.4 patches had
optimization regressions that are now resolved in 2.1.5.Updated modules to use postcss-value-parser version 3 (thanks to @TrySound).
translate3d(0, 0, 0) becomes translateZ(0).cssnano no longer converts outline: none to outline: 0, as there are some cases where the values are not equivalent (thanks to @TrySound).
outline: none to outline: 0, as there are
some cases where the values are not equivalent (thanks to @TrySound).16px to 1pc by default. Length
optimisations can be turned on via {convertValues: {length: true}}.This release swaps postcss-single-charset for postcss-normalize-charset, which can detect encoding to determine whether a charset is necessary. Option
add option to true to prepend a UTF-8
charset to the output automatically (thanks to @TrySound).safe option was added, which disables more aggressive optimisations, as
a convenient preset configuration (thanks to @TrySound).deg to turn & vice versa, & improved
minification performance in functions (thanks to @TrySound).Fixes an issue where cssnano was removing spaces around forward slashes in string literals (thanks to @TrySound).
Fixes an issue where cssnano was removing spaces around forward slashes in calc functions.
Replaced css-list & balanced-match with postcss-value-parser, reducing the module's overall size (thanks to @TrySound).
The old options such as merge & fonts that were deprecated in release 2.5.0 were removed. The new architecture allows you to specify any module name t…
process method has the same signature as a PostCSS processor instance.merge & fonts that were deprecated in
release 2.5.0 were removed. The new architecture allows you to specify any
module name to disable it.inherit keyword.Improved performance of the core module functionOptimiser.
functionOptimiser.Adds a new optimisation which re-orders properties that accept values in an arbitrary order. This can lead to improved merging behaviour in certain ca
Adds support for disabling modules of the user's choosing, with new option names. The old options (such as merge & fonts) will be removed in 3.0.
merge & fonts) will be removed in 3.0.postcss-minify-selectors was extended to add support for conversion of ::before to :before; this release removes the dedicated postcss-pseudoelements
::before to :before; this release removes the dedicated
postcss-pseudoelements module.Consolidated postcss-minify-trbl & two integrated modules into postcss-merge-longhand.
Replaced integrated plugin filter with postcss-filter-plugins.
Fixes an issue where options were not passed to normalize-url.
Allow postcss-font-family to be disabled.
postcss-font-family to be disabled.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).Fixes incorrect minification of background:none to background:0 0.
background:none to background:0 0.Fixes an issue with nested URLs inside url() functions.
url() functions.Addresses an issue where whitespace removal after a CSS function would cause rendering issues in Internet Explorer.
Adds support for removal of unused @keyframes and @counter-style at-rules.
@keyframes and @counter-style at-rules.remove option (thanks to @dmitrykiselyov).removeAllButFirst now operates on each CSS tree, rather than the
first one passed to cssnano.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).
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.
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.Improve module loading logic (thanks to @tunnckoCore).
rem,
trailing zeroes and slash/comma separated values
(thanks to @TrySound & @tunnckoCore).-webkit-tap-highlight-color values were being
incorrectly transformed to transparent. This is not supported in Safari.Add repository/author links to package.json.
Your coding agent can read these notes before it upgrades. Set up the MCP server →