在我的 style.sass 问题中导入引导变量



我正在尝试导入我的 style.sass 中的部分引导 4 个 beta 变量,但当我编译时出现以下错误:

事件.js:160 投掷者;未处理的"错误"事件 ^ 错误:node_modules\bootstrap\scss_variables.scss 错误:darken($color, $amount)的参数$color必须是颜色

   Backtrace:
    node_modules/bootstrap/scss/_variables.scss:168, in function `darken`
    node_modules/bootstrap/scss/_variables.scss:168
    on line 168 of node_modules/bootstrap/scss/_variables.scss

$link悬停颜色:深色($link色,15%)!默认; ------------------------^

at options.error (C:UsersGiannisDesktopnp-labnode_modulesnode-sasslibindex.js:291:26)

这是我的代码:

@import "../../../node_modules/bootstrap/scss/variables"
body
  background-color: red

知道发生了什么吗?谢谢

在导入变量文件之前,必须导入functions.scss。其中定义了变暗功能。

@import "../../../node_modules/bootstrap/scss/functions";
@import "../../../node_modules/bootstrap/scss/variables";
<!--your styles here-->

最新更新