我正在尝试覆盖 bootstrap4 样式。我没有使用 Sass 的经验,但这看起来像是引导程序 SCSS 文件中的错误。
我的自定义文件是:
/* custom.scss */
/* -------begin customization-------- */
$body-bg: #000;
$body-color: #111;
/* -------end customization-------- */
/* import the necessary Bootstrap files */
@import "/bootstrap-4.0.0/scss/_variables.scss";
Run Code Online (Sandbox Code Playgroud)
我正在使用引导程序 4.4.1,但只能找到 4.0.0 的 scss 文件。
在
sass /custom.scss /custom.css
Run Code Online (Sandbox Code Playgroud)
我得到:
$color: theme-color("primary") is not a color.
?
152 ? $link-hover-color: darken($link-color, 15%) !default;
? ^^^^^^^^^^^^^^^^^^^^^^^^
?
/bootstrap-4.0.0/scss/_variables.scss 152:29 @import
/custom.scss 8:9 root stylesheet
Run Code Online (Sandbox Code Playgroud)
目标 custom.css 文件包含:
> /* Error: $color: theme-color("primary") is not a color. * , …Run Code Online (Sandbox Code Playgroud)