# Removing unused CSS with Purgecss/UnCSS

**URL:** https://discourse.roots.io/t/removing-unused-css-with-purgecss-uncss/11586
**Category:** sage
**Tags:** sage9
**Created:** 2018-02-12T08:53:35Z
**Posts:** 27
**Showing post:** 17 of 27

## Post 17 by @knowler — 2018-06-09T16:41:23Z

> [@jasonbaciulis](#):
>
> `cssnanoConfig` inside `postcss.config.js` is set to remove all comments and that prevents whitelisting directly within SCSS files. So just set to use default preset:
> 
> `const cssnanoConfig = { preset: ['default'] };`
> 
> Now just mark comments as important `/*! purgecss ignore */` and cssnano will leave them be.

Just made a pull request ([#2078](https://github.com/roots/sage/pull/2078)) that will fix this issue when (and if) merged.

You will still need to leave the comment as important, but other tools like [Autoprefixer recognize that this is necessary when using Sass or Less](https://github.com/postcss/autoprefixer#control-comments). It works without the important comment in normal (Post)CSS.

---

_[View the full topic](https://discourse.roots.io/t/removing-unused-css-with-purgecss-uncss/11586)._
