A modular CSS minifier built on top of PostCSS, version 3.7.3 (patch2). It uses small PostCSS plugins to perform advanced optimizations like custom identifier reduction, z-index rebasing, and adjacent selector merging. Released frequently alongside PostCSS updates. Differentiates from simpler minifiers (e.g., csso, clean-css) by leveraging the PostCSS ecosystem for extensibility and modularity.
npm install cssnano-paras20xxNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates using cssnano as a PostCSS plugin with safe mode enabled to avoid aggressive optimizations.
Use `cssnano({ safe: true })` instead of `cssnano({ options: { safe: true } })`.Use `cssnano({ preset: 'safe' })` or set specific options.Use `cssnano({ zindex: false })` to disable z-index rebasing.Enable safe mode or explicitly disable individual optimizations.
Consult migration guide; use `cssnano({ preset: 'default' })` and review breaking changes.Ensure you call cssnano() to get the plugin: `postcss([ cssnano() ])`.
Use `cssnano({ preset: 'safe' })` or configure via `preset`.Run `npm install cssnano --save-dev` and import using `import cssnano from 'cssnano'`.