css / csso

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

incorrect optimization of few rules #398

Closed dvskorikov closed 4 years ago

dvskorikov commented 4 years ago

Hello, The code below brings to duplication of rules ".main-page-service-section .container" with incorrect properties inside one of them:

.main-page-popular-goods-section .catalog-item, .catalog-section .catalog-item { margin-top: 10px; margin-bottom: 10px; }

.main-page-popular-brands-list { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; }

.main-page-popular-brands-item a { display: inline-block; width: 218px; height: 140px; }

.main-page-popular-brands-item img { display: block; padding-top: 1px; }

.main-page-popular-brands-item { margin-bottom: 20px; }

.main-page-service-section { height: 522px; margin-bottom: 54px; }

.main-page-popular-brands-section { margin-bottom: 64px; }

.main-page-service-section .container { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-preferred-size: 940px; flex-basis: 940px; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-box-pack: start; -ms-flex-pack: start; justify-content: space-between; -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; margin: 0 auto; }

.main-page-service-header { -ms-flex-preferred-size: 940px; flex-basis: 940px; padding-top: 40px; }

dvskorikov commented 4 years ago

it was an error in the rule (different values for prefixed and unprefixed properties): main-page-popular-brands-list { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-box-pack: start; -ms-flex-pack: start; justify-content: space-between; }