Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在普通的 CSS 中,我可以说
.divclass * {something}
这适用于 divclass 内部的所有内容,但不适用于 divclass 本身。
SASS 中是否有捷径可以做到这一点(Divclass 和里面的所有东西)?
最有效的写法是这样的:
.divclass { &, * { // styles } }
编译为:
.divclass, .divclass * { // styles }