我试图使用带有扩展类的modernizr类。我有以下SCSS代码:
%some-extended-class {
color:red;
}
.no-csstransforms %some-extended-class {
color:blue;
}
.class-one {
.class-two {
.class-three {
@extend %some-extended-class;
}
}
}
注意两个扩展类声明;第二个是.no-csstransforms
modernizr类之前。这就是我期望得到的结果:
.class-one .class-two .class-three {
color: red;
}
.no-csstransforms .class-one .class-two .class-three {
color: blue;
}
然而,这是我得到的输出:
.class-one .class-two .class-three {
color: red;
}
.no-csstransforms .class-one .class-two .class-three, .class-one .class-two .no-csstransforms .class-three {
color: blue;
}
请注意额外的.class-one .class-two .no-csstransforms .class-three
,这是不必要的,我不明白为什么要添加它?