【发布时间】:2016-08-08 17:40:57
【问题描述】:
Using the SASS solution as a reference,你如何使用 LESS 做到这一点?
h1, h2, h3,
h4, h5, h6 {
@extend %headings !optional;
}
然后像这样使用它:
.element > %headings {
color: red;
}
最终我想在未来这样做:
.something {
%headings { color: red; }
}
这样它会编译成:
.something h1,
.something h2,
.something h3 { color: red; }
【问题讨论】: