【发布时间】:2016-08-30 09:49:52
【问题描述】:
以下 scss mixin 存在编译错误
“... (base, $base)”后的 CSS 无效:预期为“)”,为“;”
找不到错误,请帮忙
// Variables for Materiel colours
$primary : #0293FF;
$primary-dark : darken($primary,25%);
$primary-light : lighten($primary,75%);
$accent : #FF5252;
$text : #ffffff;
$primary-text : #333333;
$secondary-text : #727272;
$divider : #B6B6B6;
$base : #FAFAFA;
$palette: (primary, $primary),
(primary-dark, $primary-dark),
(primary-light, $primary-light),
(text, $text),
(primary-text, $primary-text,
(secondary-text, $secondary-text),
(accent, $accent),
(divider, $divider),
(base, $base);
@each $palette , $color in $palette {
.colour-#{$palette } {
color: $color;
}
.bg-#{$palette } {
background-color: $color;
}
}
【问题讨论】: