【发布时间】:2020-12-07 02:57:47
【问题描述】:
我正在尝试设置默认字体大小,然后使用它来获取其他字体大小。
$base-font-size: calc(100% + 0.25vw); // this is fine
$font-size--2: $base-font-size * 0.5; // the multiplication causes an error here
$font-size--1: $base-font-size * 0.75;
$font-size-1: $base-font-size * 1.25;
我从编译器得到这个
错误:未定义的操作“calc(100% + 0.25vw) * 0.5”。 ╷ 14 │ $font-size--2: $base-font-size * 0.5; │ ^^^^^^^^^^^^^^^^^^^^^ ╵ styles.scss 14:16 根样式表
进程以退出代码 65 结束
【问题讨论】: