sass编译css时出现错误

我在控制台可以看到输出的字符串,可是我的css文件就出错了,求解决办法。
clipboard.png

@function double($width){//自定义函数

@if $width > 3px{
    @error "$width not > 3px";
}
@return $width * 2;

}
body{

$color:rgb(255,255,255);
color:$color;
//background-color:rgba(255,0,200,05);
background-color:rgba($color,05);
 
p{
    color: darken($color,2);//颜色加深函数,加深了2倍
    background-color: lighten($color,0.9);//变浅
    z-index: str-length('aaaaaa');//6
    z-index: str-index('abcdef','d');//4,这个索引以1开头
    width: double(5px);
}

}
@Debug 'This is a debug test';
@warn 'warn';
@error 'error';//这三个在控制台进行输出

@function getzIndex($layer:default){

$zindexMap:(default:1,modal:1000,dropdown:500,grid:300);
$zindex:0;
@if map-has-key($zindexMap,$layer){
    $zindex:map-get($zindexMap,$layer);
}@else{
    $zindex:1;
};
@return map-get($zindexMap,$layer);

}
@Debug getzIndex(modal);//1000
@Debug getzIndex(asd);//1

阅读 3.2k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进