2

Gulp in postcss with cssnano combine the same selector when the selector next to it but unfortunately it does not combine the selector when it is not next to it.

It works very well when selectors are next to it

.box {
    color: blue;
}
.box {
    font-weight: 700;
}

to

.box {
    color: blue;
    font-weight: 700;
}

unfortunately it doesn't do the job when it is not next it

.box {
    color: blue;
}
.love{
  color: red;
}
.box {
    font-weight: 700;
}
Mo.
  • 26,306
  • 36
  • 159
  • 225

0 Answers0