cssshrink
cssshrink copied to clipboard
Why only adjacent selectors / MQ ?
Hello,
I wonder why only the adjacent selectors / Media Queries / keyframes are packed.
Would it be possible to add an option (a checkbox labelled "great power / great responsibility") which allows packing of non-adjacent stuff ?
I was wondering the same thing - I noticed that this input:
.a .b {
padding-right: 10px;
}
.a .b .c {
position: absolute;
}
.a .b {
padding-bottom: 10px;
}
has the following output:
.a .b {
padding-right: 10px;
}
.a .b .c {
position: absolute;
}
.a .b {
padding-bottom: 10px;
}
when it's possible to see that the top and bottom selectors could be combined.
Is it done this way because there's no way to guarantee the precedence is maintained otherwise?