cssnano/cssnano

CSScssnano.github.io/cssnano/

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

postcsscssnanooptimisationcssminification
Star Growth
Stars
5k
Forks
328
Weekly Growth
+1
Issues
52
2k4k
Apr 2015Jan 2019Nov 2022Sep 2026
Artifactsnpm
README


cssnano


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

Backers on Open Collective Sponsors on Open Collective NPM version Build Status codecov Gitter

cssnano is a modern, modular CSSS compression tool written on top of the PostCSS ecosystem, which allows us to use a lot of powerful features in order to minify CSS.

Our preset system allow you to load cssnano in a different configuration depending on your needs; the default preset performs safe transforms, whereas the advanced preset performs more aggressive transforms that are safe only when your site meets the requirements; but regardless of the preset you choose, we handle more than whitespace transforms!

Optimisations range from compressing colours & removing comments, to discarding overridden at-rules, normalising unicode-range descriptors, even mangling gradient parameters for a smaller output value! In addition, where it's made sense for a transform, we've added Browserslist to provide different output depending on the browsers that you support.

For further details check out the website:

You can now try cssnano online!

Contributing

See CONTRIBUTING.md.

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

License

MIT © Ben Briggs

Related repositories
tailwindlabs/tailwindcss

A utility-first CSS framework for rapid UI development.

TypeScriptnpmMIT Licensetailwindcsscss
tailwindcss.com
97.5k5.6k
saadeghi/daisyui

🌼 🌼 🌼 🌼 🌼  The most popular, free and open-source Tailwind CSS component library

JavaScriptnpmMIT Licensetailwind-cssui-library
daisyui.com
42.3k1.7k
postcss/postcss

Transforming styles with JS plugins

TypeScriptnpmlibraryMIT Licensepostcsscss
postcss.org
29k1.6k
aniftyco/awesome-tailwindcss

😎 Awesome things related to Tailwind CSS

awesomeCreative Commons Zero v1.0 Universaltailwindcssawesome
tailwindcss.com
15.2k1k
stylelint/stylelint

A mighty CSS linter that helps you avoid errors and enforce conventions.

JavaScriptnpmMIT Licenselintercss
stylelint.io
11.5k1k
uncss/uncss

Remove unused styles from CSS

JavaScriptnpmlibraryMIT Licenseuncssjavascript
9.4k403
FullHuman/purgecss

Remove unused CSS

TypeScriptnpmMIT Licensecssoptimization-tools
purgecss.com
8k242
fkling/astexplorer

A web tool to explore the ASTs generated by various parsers.

JavaScriptnpmappMIT Licenseast-explorerparser
astexplorer.net
6.5k773
chakra-ui/panda

🐼 Universal, Type-Safe, CSS-in-JS Framework for Design Systems ⚡️

TypeScriptnpmMIT Licensecssstyled-system
panda-css.com
6.2k315
MoOx/postcss-cssnext

`postcss-cssnext` has been deprecated in favor of `postcss-preset-env`.

JavaScriptnpmMIT Licensepostcsscss
moox.io/blog/deprecating-cssnext/
5.3k184
egoist/poi

⚡A zero-config bundler for JavaScript applications.

JavaScriptnpmlibraryMIT Licensewebpackbuild-tool
poi.js.org
5.2k252
peterramsing/lost

LostGrid is a powerful grid system built in PostCSS that works with any preprocessor and even vanilla CSS.

JavaScriptnpmMIT Licensegridpostcss
lostgrid.org
4.5k155