Tac say

只想做个程序演奏家

CSS Compressor Bug

使用css compressor 压缩项目中的css,可以合并相同定义的style,但也引起了bug。

比如:

.A的类型应当是background: BB
1
2
3
4
5
6
7
8
9
10
11
12
.A, .B {
        background: BB
}

.A {
        background: AA
}

//in another file
.A, .B {
        background: BB
}
压缩后,.A的类型变为background: AA
1
2
3
4
5
6
7
.A, .B {
        background: BB
}

.A {
        background: AA
}

因为合并了相同定义,覆盖关系被打乱。

暂时没找到好的css compressor,来分解并合并css

Comments