css / csso

CSS minifier with structural optimizations
https://css.github.io/csso/csso.html
MIT License
3.75k stars 188 forks source link

Wrong restructuring of border rules #417

Open accetone opened 4 years ago

accetone commented 4 years ago

Tested with 4.0.3.

Maybe duplicate of #143, but I'm not 100% sure, so decide to create new issue.

Here is example.

// Input
.class1 {
    border-bottom: 1px solid black;
}

.class2 {
    border: 0;
    border-bottom: 1px solid black;
}

.class3 {
    border: 0;
}
// Output
.class1,.class2{
  border-bottom:1px solid #000
}

.class2,.class3{
  border:0
}

The problem is that border-bottom overwritted by border which not the case in source style.