1

... should I file this as a bug. w/out using it my code works. When I use it I loose some of my stylings.

After looking into it further, it is deleting multiple definitions of classes.

Also, someone with a similar problem here - Avoid Grunt cssmin task to remove duplicate entries

I have the same class defined 4 times for each browser. The browsers know which one to use b.c. of the browser extensions.

Is there a way to tell it not to do this:

Here is the Gruntfile.js

cssmin: {
  options: {
    shorthandCompacting: false,
    roundingPrecision: -1
  },
  target: {
    files: {
      [b + 'css/monster.min.css']: [b + 'css/monster.css']
    }
  }
}

Here is the broken CSS.

enter image description here

Here is the relevant code:

/***************************************************************************************************
  BROWSER SPECEFIC
*/

/*<|{FireFox}_css|>*/


/***************************************************************************************************
FF
*/


/* ui-dialog is used by jqueryui
*/
.ui-dialog, .grey_box {
  background:  -moz-linear-gradient(top, #fefefe, #dddddd);
}

/*
*/


.black_but{
  color:       #ffffff;
  border:      1px solid #222222;
  background:  -moz-linear-gradient(top, #888888, #444444);
}
.black_but:hover{
  background:  -moz-linear-gradient(top, #444444, #222222 );
}
.black_but:active{
  border:      1px solid #444444;
  background:  -moz-linear-gradient(top, #222222, #000000);
}

/*
*/

.blue_but{
  color:       #ffffff;
  border:      1px solid #057ed0;
  background:  -moz-linear-gradient(top, #31baed, #019ad2);
}
.blue_but:hover{
  background:  -moz-linear-gradient(top, #2aaada, #0271bf );
}
.blue_but:active{
  border:      1px solid #096eb3;
  background:  -moz-linear-gradient(top, #0271bf, #0271bf);
}

/*
*/
Community
  • 1
  • 1
cade galt
  • 3,843
  • 8
  • 32
  • 48
  • Can you explain "The browsers know which one to use b.c. of the browser extensions."? Removing duplicates is one of the properties of CSS minification since in normal cases, the overridden ones are just waste of space and could be discarded. – dinesh ygv Mar 04 '16 at 06:39

0 Answers0