cssnano

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

Github stars Tracking Chart

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

NPM version
Build Status
codecov
Gitter

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

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 colors & 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.

License

MIT © Ben Briggs

Main metrics

Overview
Name With Ownercssnano/cssnano
Primary LanguageCSS
Program languageJavaScript (Language Count: 3)
Platform
License:MIT License
所有者活动
Created At2015-04-14 16:23:09
Pushed At2025-05-22 19:38:24
Last Commit At2025-05-22 21:38:21
Release Count813
Last Release Namestylehacks@7.0.5 (Posted on 2025-05-06 15:46:42)
First Release Namev1.0.0 (Posted on 2015-04-14 17:26:25)
用户参与
Stargazers Count4.9k
Watchers Count48
Fork Count322
Commits Count2.6k
Has Issues Enabled
Issues Count741
Issue Open Count93
Pull Requests Count690
Pull Requests Open Count6
Pull Requests Close Count252
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private