1
如果我有以下将样式应用于分组多个子元素
.dark-theme .link {color:black;}
.dark-theme a {color:red;}
.dark-theme button {color:green;}
.dark-theme div {color:orange;}
.dark-theme .whatever {color:blue;}
.dark-theme .element {color:navyblue;}
.dark-theme .element2 {color:black;}
有没有办法做这样的事情
.dark-theme {
.link {color:black;}
a {color:red;}
button {color:green;}
div {color:orange;}
.whatever {color:blue;}
.element {color:navyblue;}
.element2 {color:black;}
}
集团风格的孩子,所以我没有继续改写父母之前。
少用或SCSS – LGSon
的可能的复制[嵌套CSS类(http://stackoverflow.com/questions/4564916/nesting-css-classes) –