CSSNANO

Deliver your website's styles, faster.

Plug in cssnano into your build step for modern CSS compression.

Get Started

What it does

cssnano takes your nicely formatted CSS and runs it through many focused optimisations, to ensure that the final result is as small as possible for a production environment.

Input

/* normalize selectors */
h1::before, h1:before {
    /* reduce shorthand even further */
    margin: 10px 20px 10px 20px;
    /* reduce color values */
    color: #ff0000;
    /* remove duplicated properties */
    font-weight: 400;
    font-weight: 400;
    /* reduce position values */
    background-position: bottom right;
    /* normalize wrapping quotes */
    quotes: '«' "»";
    /* reduce gradient parameters */
    background: linear-gradient(to bottom, #ffe500 0%, #ffe500 50%, #121 50%, #121 100%);
    /* replace initial values */
    min-width: initial;
}
/* correct invalid placement */
@charset "utf-8";

Output

@charset "utf-8";h1:before{margin:10px 20px;color:red;font-weight:400;background-position:100% 100%;quotes:"«" "»";background:linear-gradient(180deg,#ffe500,#ffe500 50%,#121 0,#121);min-width:0}

The semantics of this CSS have been kept the same, but the extraneous whitespace has been removed, the identifiers compressed, and unnecessary definitions purged from the stylesheet.

This gives you a much smaller CSS for production use. But don’t just take our word for it; why not try out css-size, a module especially created to measure CSS size before & after minification.

By default, cssnano performs safe optimisations on your CSS file, but we also offer an advanced preset with techniques that you can use to maximise compression. For more details, see our optimisations guide.

Original (gzip) 325 B
Minified (gzip) 177 B
Difference 148 B
Percent 54.46%

Features

PostCSS Based

CSSNANO is built upon postcss plugins and environments

30+ Plugins

CSSNANO has more than 30 plugins for optimizing your css

Configurable

CSSNANO supports custom configs using presets which controls the level of optimization

Technology

cssnano is powered by PostCSS, a tool for transforming styles with JavaScript. Specifically, its plugin architecture allows us to compose cssnano out of small modules with limited responsibilities. It also allows you to easily insert cssnano into your build step, along with other processors that can lint your CSS for errors, or transpile future syntax.

bg pattern close-circle
abc.com
domain name is for sale
This website is inactive. Its old content has been restored to preserve the site’s SEO value (like backlinks from authority websites).
This is important for expired domain investors because that SEO value can help you rank high on Google within weeks or even days, instead of months or years.
Click here to purchase the domain

cssnano.co — Website No Longer Available

This domain has expired and been acquired by SerpNames.com. We have restored an archived version of this website using materials from Archive.org to preserve its historical and SEO value.

This is not the active website of the former owner or organization. We are not affiliated with or endorsed by any prior operators or related entities that may still be active elsewhere.

All content displayed here was publicly available prior to expiration and is presented under fair use for informational and archival purposes only.

Our intention is solely to maintain the domain’s historical context and not to harm or misrepresent any business, organization, or individual. No logins, payments, or personal data are collected or processed on this page.

If you are the previous owner or wish to request content removal, please contact team@serpnames.com.