Structural optimization bug: wrong place for merged blocks
File test.css:
.footer__teaser-image_type_i-phone
{
background: url(a.png);
background-image: url(../../../sprites/c.png);
background-repeat: no-repeat;
background-position: -102px -74px;
}
.footer__teaser-image_type_logo
{
background: url(b.png);
background-image: url(../../../sprites/c.png);
background-repeat: no-repeat;
background-position: -2px -146px;
}
Run csso: csso test.css _test.css
File _test.css:
.footer__teaser-image_type_i-phone{background:url(a.png);background-position:-102px -74px}
_.footer__teaser-image_type_i-phone,.footer__teaser-image_type_logo{background-image:url(../../../sprites/c.png);background-repeat:no-repeat}_
.footer__teaser-image_type_logo{background:url(b.png);background-position:-2px -146px}
I expect that common styles rule will be inserted after original ones but not between.
:+1: running into this exact issue as well.
Declarations are being dropped for me as well:
.brand,
.name,
.description {
margin: 0 auto;
padding: 0 20px;
max-width: 360px
}
.brand,
.name {
margin-top: 0;
line-height: 1
}
.brand {
margin-bottom: 8px;
font-weight: 900;
font-size: 1.625em;
text-transform: uppercase
}
.name {
margin-bottom: 6px;
font-weight: 700;
font-size: 1.125em
}
Becomes:
.brand,
.name,
.description {
padding: 0 20px;
max-width: 360px
}
.brand {
line-height: 1
}
.name {
margin-top: 0;
line-height: 1
}
.brand {
margin: 0 auto 8px;
font-weight: 900;
font-size: 1.625em;
text-transform: uppercase
}
.name {
margin-bottom: 6px;
font-weight: 700;
font-size: 1.125em
}
Notice how the margin: 0 auto declaration has been dropped in the optimized version.
Duplicates #143