I use grunt-contrib-cssmin to minimize my css files. I think this tool (grunt-contrib-cssmin) is just a wrapper for clean-css. Everything is in order, except for the fact that this grunt plugin is making changes to my css. I tried using every parameter I could find in the clean-css repository, but nothing worked. Please help me, this thing is killing me!
Grant File:
module.exports = function (grunt) { 'use strict'; // Project configuration grunt.initConfig({ // Metadata pkg: grunt.file.readJSON('package.json'), cssmin: { options: { keepSpecialComments:'1', processImport: false, roundingPrecision: -1, shorthandCompacting: false, aggressiveMerging: false, advanced: false, }, minified_css_admin: { src: ['public/admin/css/style.default.css','public/admin/prettify/prettify.css','public/admin/css/bootstrap-fileupload.min.css','public/admin/css/developer.css'], dest: 'public/admin/css/minified-css-admin.min.css', }, }, }); // These plugins provide necessary tasks grunt.loadNpmTasks('grunt-contrib-cssmin'); // Default task grunt.registerTask('default', ['admin-default']); grunt.registerTask('admin-default', ['cssmin:minified_css_admin']); };
Before the thumbnail:
.loginwrapper input#remember_me { margin: 0 !important; min-height: 10px; width: auto; box-shadow: 0px 0px; background:none; padding-left:0px!important; padding-right:5px!important; }
After determining:
.loginwrapper input#remember_me{margin:0!important;min-height:10px;width:auto;box-shadow:0 0;background:0 0;padding-left:0!important;padding-right:5px!important}
Now you can see that the value of "background: none" is changed to "background: 0 0". How can I make sure that it does not make any changes to my CSS, except for its exception.
source share