Minify your CSS

Online CSS Minifier/Compressor. Free! Provides an API. Simple Quick and Fast.

Digital Ocean

We recommend Digital Ocean for hosting your sites. Free $10 credit when you sign up.

Import Statements Left Intact

Prior to today's release, any @import statements were being processed but deleted in the final minified output. This is because clean-css presumes files are being processed locally and the @import file exists on the filesystem too.

However, when minifying on the web, only one file is minified at a time, therefore any file referenced via the @import statement won't exist and the statement was replaced with nothing - it was essentially deleted.

Luckily, clean-css has a config option for processImport : false which means that @import statements are now not processed and are therefore left intact. Which is exactly what we need here.

Thanks to @Vicrry for reporting this issue.

Have fun and happy CSS'ing!

Tags: site-update css

Posted: 4 years ago