【发布时间】:2019-04-21 09:19:53
【问题描述】:
我尝试构建自己的主题。我将颜色主题更改为我的风格。但是我在编译自己的主题时出错,这是我创建的主题。
// 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);
----------^
如何解决这个错误,我的代码有什么问题。我按照引导文档中的说明进行操作,但仍然出错。
【问题讨论】:
-
哎呀,我写错了颜色,不应该使用引号。 :)
标签: sass gulp bootstrap-4