我用这个在线工具生成了一个角度材料主题:http://materialtheme.arcsine.org/,并将其包含在styles.css中。我还重新编译了节点-sass。
但我(仍然)收到了这个错误:
Argument `$color` of `rgba($color, $alpha)` must be a color在节点_模块/@角/物质/_meing.scss(第1277行,第11列)中。下面是这个问题的函数:
@function mat-color($palette, $hue: default, $opacity: null) {
// If hueKey is a number between zero and one, then it actually contains an
// opacity value, so recall this function with the default hue and that given opacity.
@if type-of($hue) == number and $hue >= 0 and $hue <= 1 {
@return mat-color($palette, default, $hue);
}
$color: map-get($palette, $hue);
$opacity: if($opacity == null, opacity($color), $opacity);
@return rgba($color, $opacity);
}知道这里出了什么问题吗?生成的样式如下所示:https://github.com/arciisine/MaterialThemeGenerator/blob/master/src/styles
我用的是6.4.6材料
发布于 2018-11-27 14:43:35
对于任何有同样问题的人:我更新到了角7.1,现在起作用了。
https://stackoverflow.com/questions/53501318
复制相似问题