【问题标题】:i was trying to compile css to scss and i am getting this error我试图将 css 编译为 scss,但我收到了这个错误
【发布时间】:2021-10-31 12:32:34
【问题描述】:
{
  "status": 1,
  "file": "E:/Natours/sass/main.scss",
  "line": 31,
  "column": 5,
  "message": "argument `$alpha` of `rgba($color, $alpha)` must be a number",
  "formatted": "Error: argument `$alpha` of `rgba($color, $alpha)` must be a number\n        on line 31 of sass/main.scss, in function `rgba`\n        from line 31 of sass/main.scss\n>>     rgba($color-primary-light, o.8),\r\n   ----^\n"
}

这是来自控制台的错误:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! natours@1.0.0 compile:sass: `node-sass sass/main.scss css/style.css`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the natours@1.0.0 compile:sass script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\SAHIL\AppData\Roaming\npm-cache\_logs\2021-09-02T01_47_56_926Z-debug.log

【问题讨论】:

    标签: css node.js npm sass


    【解决方案1】:

    看起来不透明度无法作为变量发送,请尝试发送适当的数字:

    rgba($color, 0.88);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-11-26
      • 2022-01-20
      • 1970-01-01
      • 1970-01-01
      • 2021-06-29
      • 1970-01-01
      • 2016-12-28
      • 1970-01-01
      相关资源
      最近更新 更多