【发布时间】:2017-08-05 11:24:50
【问题描述】:
我正在使用 SCSS 更改 bootstrap 4 的样式以创建我自己的样式,但是当我编译我的 SCSS 时出现此错误:
{
"status": 1,
"file": "H:/!WEBSITE/modules/The Force - Bootstrap/content/scss/variables/variables.scss",
"line": 330,
"column": 34,
"message": "Incompatible units: 'px' and 'px*px'.",
"formatted":
"Error: Incompatible units: 'px' and 'px*px'.
on line 330 of scss/variables/variables.scss
>> $input-height: (($font-size-base * $input-line-height) + ($input-padding-y * 2)) !default;"
}
我的变量值:
$font-size-base: 14px !default;
$line-height-base: 1.846 !default;
$input-line-height: floor(($font-size-base * $line-height-base)) !default;
$input-padding-y: 6px !default;
弹出错误的那一行:
$input-height: (($font-size-base * $input-line-height) + ($input-padding-y * 2)) !default;
我不明白为什么它不起作用,我更不明白如何解决它。我使用 node-sass 编译 SCSS,但我认为问题不是来自 node-sass,因为这不是我第一次使用它,而且我整天都在使用它,没有出现任何此类错误。
【问题讨论】:
标签: css node.js twitter-bootstrap sass bootstrap-4