node package manager

grunt-csso

Minify CSS files with CSSO.

grunt-csso

Minify CSS files with CSSO.

Run this task with the grunt csso command.

Task targets, files and options may be specified according to the grunt Configuring tasks guide.

Files are compressed with csso.

Type: Boolean
Default: true

You can turns structural optimizations off.

Type: String
Default: null

Prefix the compressed source with the given banner, with a linebreak inbetween.

Choise: false, 'min', 'gzip'
Default: false

Either report only minification result or report minification and gzip results. This is useful to see exactly how well clean-css is performing but using 'gzip' will make the task take 5-10x longer to complete. Example output.

csso: {
  compress: {
    options: {
      report: 'gzip'
    },
    files: {
      'output.css': ['input.css']
    }
  },
  restructure: {
    options: {
      restructure: false,
      report: 'min'
    },
    files: {
      'restructure.css': ['input.css']
    }
  },
  banner: {
    options: {
      banner: '/* Copyleft */'
    },
    files: {
      'banner.css': ['input.css']
    }
  },
  shortcut: {
    src: 'override.css'
  }
}
csso: {
  dynamic_mappings: {
    expand: true,
    cwd: '/css/',
    src: ['*.css', '!*.min.css'],
    dest: 'dest/css/',
    ext: '.min.css'
  }
}