gpt4 book ai didi

css - scss Mixins 错误

转载 作者:太空宇宙 更新时间:2023-11-04 09:49:29 24 4
gpt4 key购买 nike

下面的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;
}
}

最佳答案

$primary-text 后是否缺少右括号?

$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);

关于css - scss Mixins 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39224204/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com