<div class="color red">
用scss规则这样写也可以,但总觉得哪里不对,有其它的写法吗?
.color{} .color.red{}
如果想要在 SCSS 中写出更具可读性的代码,可以把这两行代码写成下面这样:
.color {&.red {}}