Questions tagged [clean-css]

clean-css is a fast and efficient CSS optimizer for the Node.js platform and any modern browser

enter image description here

clean-css is a fast and efficient CSS optimizer for the Node.js platform and any modern browser.

According to tests it is one of the best available.

How to Install

npm install --save-dev clean-css

Usage

var CleanCSS = require('clean-css');
var input = 'a{font-weight:bold;}';
var options = { /* options */ };
var output = new CleanCSS(options).minify(input);
34 questions
0
votes
1 answer

Why the task's output of gulp-clean-css for minify CSS is empty file?

I use gulp-clean-css as a gulp.task to minify CSS. My file path is css/mehr.css and the path of minified CSS will be css/mehr.min.css But when I run the task : gulp minify_css_task The mehr.min.css is created, but it's empty! output : [11:45:01]…
Mojtaba Arvin
  • 679
  • 1
  • 10
  • 21
0
votes
0 answers

Change "clean css" options in grunt min css

Is there some kind of special syntax I need to use to override Clean CSS defaults when using Grunt CSS min? Looking at the docs I can successfully get the "roundingPrecision" example working but trying to override other Clean CSS rules does not work…
SparrwHawk
  • 13,581
  • 22
  • 61
  • 91
0
votes
1 answer

Grunt htmlmin clean-css breaking my Handlebars code within tags

I have minifyCSS set to true in my Gruntfile.js htmlmin section like so: htmlmin: { dist: { options: { removeComments: true, collapseWhitespace: true, minifyJS: true, minifyCSS:…
D.Tate
  • 2,289
  • 3
  • 22
  • 35
0
votes
1 answer

Use clean-css compatibility options in grunt-contrib-cssmin

I ran into an issue with clean-css in IE10. I'm needing to turn off the spaces after closing braces optimization. I'm using the grunt-contrib-cssmin plugin to automate all these optimizations, but I don't see a way to access the compatibility flags…
Benjamin Solum
  • 2,281
  • 18
  • 29
1 2
3