我正在尝试为materilize sass http://materializecss.com/color.html添加一个新的调色板。
我已经将他在sass文件中看到的内容与一些新变量进行了复制,但它无效。
_color.scss中的我添加了
$my-blue: (
"base": #0069B1,
);
_variables.scss中的我添加了
$my-primary-blue: color("my-blue", "base") !default;
然后我修改了_variables.scss中的一行来使用我的新颜色
从:
$button-background-focus: lighten($secondary-color, 4%) !default;
到
$button-raised-background-hover: lighten($my-primary-blue, 5%) !default;
然后我在编译中遇到错误
>> Error: argument `$color` of `lighten($color, $amount)` must be a color
答案 0 :(得分:0)
想出来,需要稍后在
添加更多颜色变量$colors: (
"materialize-red": $materialize-red,
"red": $red,
"pink": $pink,
"purple": $purple,
"deep-purple": $deep-purple,
"indigo": $indigo,
"blue": $blue,
"light-blue": $light-blue,
"cyan": $cyan,
"teal": $teal,
"green": $green,
"light-green": $light-green,
"lime": $lime,
"yellow": $yellow,
"amber": $amber,
"orange": $orange,
"deep-orange": $deep-orange,
"brown": $brown,
"blue-grey": $blue-grey,
"grey": $grey,
"shades": $shades,
"my-blue": $my-blue,
) !default;