每当我运行时,sass --watch src/sass:dist/css
我都会从命令行收到此错误
错误: ("primary": #0075dd !important, "secondary": #6b7a93 !important, "sucess": #1eaf3e !important) 不是有效的 CSS 值。
$map-theme-colors-rgb: create-map($map-theme-colors, convert-to-rgb, "value") !default; ^^^^^^^^^^^^^
这是一些代码片段。
_functions.scss
@function create-map($map, $callback-func, $args...) {
$_created-map: ();
@each $key, $value in $map {
$_args: ();
@each $arg in $args {
$_args: append(
$_args, if($arg == "key", $key, if($arg == "value", $value, $arg))
);
}
$_created-map: map.map-merge(
$_created-map,
meta.call(meta.get-function($callback-func), $_args...)
);
}
@return $_created-map;
}
_variables.scss
$map-theme-colors: (
"primary": $primary,
"secondary": $secondary,
"sucess": $sucess
) !default;
$map-theme-colors-rgb: create-map($map-theme-colors, convert-to-rgb, "value") !default;
我希望你能帮我解决这个问题。谢谢你。