%extendor
color: blue
&:hover
color: red
.something
&, .more-specific &
@extend %extendor
产生以下结果:
Sass< 3.2,libsass 2.0
.something, .more-specific .something {
color: blue; }
.something:hover, .more-specific .something:hover {
color: red; }
Sass 3.2 +
.something, .more-specific .something {
color: blue;
}
.something:hover {
color: red;
}
如何使“新Sass”表现得像以前一样?
答案 0 :(得分:0)
Sass没有任何“遗留行为”设置。您有3个选择:
或者,您可以停止在选择器中重复类:
%extendor
color: blue
&:hover
color: red
.something, .something-else
@extend %extendor