.green-oval-button {
@extend .oval-button;
@include radial-gradient($green-gradient...);
&:active {
@include radial-gradient($green-gradient-active...);
}
}
.blue-oval-button {
@extend .oval-button;
@include radial-gradient($blue-gradient...);
&:active {
@include radial-gradient($blue-gradient-active...);
}
}
SassScripts
是否可以用Mixin
++简化上面的Interpolation
内容Variable Arguments
?
示例:它导致错误
@mixin color-oval-button($color) {
@extend .oval-button;
@include radial-gradient(#{$color}-gradient...);
&:active {
@include radial-gradient(#{$color}-gradient...);
}
}
@include color-oval-button("$green");
@include color-oval-button("$blue");