grunt-contrib-css is breaking my CSS b.c. it removes multiple entries …?

心不动则不痛 提交于 2019-12-11 12:51:50

问题


... 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.

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);
}

/*
*/

来源:https://stackoverflow.com/questions/34845819/grunt-contrib-css-is-breaking-my-css-b-c-it-removes-multiple-entries

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!