csso
csso copied to clipboard
"Merging blocks with identical properties" behaving awkwardly
CSSO 1.3.11 node v0.10.36
I don't know exactly what is going on, so I couldn't name the issue properly.
This snippet:
.foo {
color: green;
}
.bar {
color: green;
}
div, section, span, table {
color: red;
}
table, td, th {
color: red;
}
...provides this output (which is expected):
.foo,.bar{color:green}div,section,span,table,td,th{color:red}
But if I add a property, it doesn't merge .foo
and .bar
anymore:
.foo {
color: green;
}
.bar {
color: green;
}
div, section, span, table {
background: green; /* adding a property here breaks the merging */
color: red;
}
table, td, th {
color: red;
}
...and if I remove the div
selector:
.foo {
color: green;
}
.bar {
color: green;
}
/* div */ section, span, table {
background: green; /* the property is still here, but it works now */
color: red;
}
table, td, th {
color: red;
}
...it merges in a very awkward way:
.foo,.bar{color:green}section,span{color:red}section,span,table{background:green}table,td,th{color:red}