而不是分别定义多个变量,如:
$logo_text_color: $white
$menu_link_color: $white
$menu_icon_color: $white
有没有办法一次定义它们;这样的事情?
$logo_text_color, $menu_icon_color, $menu_link_color: $white
答案 0 :(得分:0)
最后我找到了解决方案......
<强> SASS:强>
=els($a: 1, $b: 2, $c: 3)
height: $a + px
width: #{$b}px
content: abc
.cool
+els
.things
+els($a: 100)
.stuff
+els($c: 29)
.other
+els($c: 29, $b: 54)
<强> CSS:强>
.cool {
height: 1px;
width: 2px;
content: abc;
}
.things {
height: 100px;
width: 2px;
content: abc;
}
.stuff {
height: 1px;
width: 2px;
content: abc;
}
.other {
height: 1px;
width: 54px;
content: abc;
}