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) –