Gia*_*dis 4 sass twitter-bootstrap
我试图在我的style.sass中导入bootstrap 4 beta变量部分但是当我编译时我得到以下错误:
events.js:160 throw er; //未处理"错误"事件^错误:node_modules \引导\ scss_variables.scss错误:参数
$color的darken($color, $amount)必须是一个彩色Run Code Online (Sandbox Code Playgroud)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-hover-color:darken($ link-color,15%)!default; ------------------------ ^
Run Code Online (Sandbox Code Playgroud)at options.error (C:\Users\Giannis\Desktop\np-lab\node_modules\node-sass\lib\index.js:291:26)
这是我的代码:
@import "../../../node_modules/bootstrap/scss/variables"
body
background-color: red
Run Code Online (Sandbox Code Playgroud)
有什么想法发生了什么?谢谢
小智 10
在导入变量文件之前,您必须导入functions.scss.变暗功能在其中定义.
@import "../../../node_modules/bootstrap/scss/functions";
@import "../../../node_modules/bootstrap/scss/variables";
<!--your styles here-->
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1537 次 |
| 最近记录: |