Sass 错误:“mix($color-1,$color-2,$weight:50%)”的参数“$color-2”在编译我自己的引导主题时必须是颜色
我试图建立自己的主题。我将颜色主题更改为我的风格。但我在编译自己的主题时出错了,这是我创建的主题Sass 错误:“mix($color-1,$color-2,$weight:50%)”的参数“$color-2”在编译我自己的引导主题时必须是颜色,sass,gulp,bootstrap-4,Sass,Gulp,Bootstrap 4,我试图建立自己的主题。我将颜色主题更改为我的风格。但我在编译自己的主题时出错了,这是我创建的主题 // 1. core variables and mixins @import "../bootstrap/functions"; @import "../bootstrap/variables"; @import "../bootstrap/mixins"; // 2. custom core variables // colors $theme-colors : ( "primary":
// 1. core variables and mixins
@import "../bootstrap/functions";
@import "../bootstrap/variables";
@import "../bootstrap/mixins";
// 2. custom core variables
// colors
$theme-colors : (
"primary": "46B078",
"secondary": "#B7E1CB",
"success": "#26de81",
"info": "#2bcbba",
"warning": "#fed330",
"danger": "#fc5c65",
);
// 3. core CSS
@import "../bootstrap/root";
@import "../bootstrap/reboot";
@import "../bootstrap/type";
@import "../bootstrap/images";
@import "../bootstrap/code";
@import "../bootstrap/grid";
@import "../bootstrap/tables";
@import "../bootstrap/forms";
@import "../bootstrap/buttons";
@import "../bootstrap/transitions";
@import "../bootstrap/dropdown";
@import "../bootstrap/button-group";
@import "../bootstrap/input-group";
@import "../bootstrap/custom-forms";
@import "../bootstrap/nav";
@import "../bootstrap/navbar";
@import "../bootstrap/card";
@import "../bootstrap/breadcrumb";
@import "../bootstrap/pagination";
@import "../bootstrap/badge";
@import "../bootstrap/jumbotron";
@import "../bootstrap/alert";
@import "../bootstrap/progress";
@import "../bootstrap/media";
@import "../bootstrap/list-group";
@import "../bootstrap/close";
@import "../bootstrap/modal";
@import "../bootstrap/tooltip";
@import "../bootstrap/popover";
@import "../bootstrap/carousel";
@import "../bootstrap/utilities";
@import "../bootstrap/print";
gulp上的错误消息:
Error in plugin "sass"
Message:
src/sass/bootstrap/_functions.scss
Error: argument `$color-2` of `mix($color-1, $color-2, $weight: 50%)` must be a color
on line 85 of src/sass/bootstrap/_functions.scss, in function `mix`
from line 85 of src/sass/bootstrap/_functions.scss, in function `theme-color-level`
from line 103 of src/sass/bootstrap/_tables.scss
from line 25 of src/sass/themes/default.scss
>> @return mix($color-base, $color, $level * $theme-color-interval);
----------^
如何修复此错误,我的代码有什么问题。我按照引导文档中的说明进行操作,但仍然出错。
主题颜色中的主颜色在颜色值之前缺少
符号
正确的行应该如下所示:
"primary": "#46B078",
哎呀,我写的颜色不对,不应该用引号。:)是的,我忘记了标签符号,不应该使用引号