css / csso

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

Better merging for same-name-selectors #400

Open asakasinsky opened 4 years ago

asakasinsky commented 4 years ago

Hello! I'm a little confused :-)

Input styles:

.awesome {
  border: 1px solid green;
  padding: 5px 20px;
}
.some-user-class {
  color: green;
}
.awesome {
  font-size: 14px;
}

Output styles (via https://css.github.io/csso/csso.html):

.awesome {
    border: 1px solid green;
    padding: 5px 20px
}

.some-user-class {
    color: green
}

.awesome {
    font-size: 14px
}

What expected:

.awesome {
    border: 1px solid green;
    padding: 5px 20px;
    font-size: 14px
}

.some-user-class {
    color: green
}
JeremieD commented 2 years ago

Hello! I was also expecting this behaviour from CSSO.