我刚开始使用sass并安装了prepros。我试图编译一个.scss文件,但得到一个错误:
Syntax error: Invalid CSS after " color: ": expected expression (e.g. 1px, bold), was "@blue;"
.scss代码:
.footer {
clear: both;
background-color: @blue;}
我安装了Ruby和prepros。
发布于 2013-06-19 07:31:46
SCSS使用$来表示变量,因此它应该是background-color: $blue;
发布于 2013-06-19 09:48:56
看起来你的语法是错的。在Sass中,@指的是imports、media directives、partials (包括)和extends。
如果您想为blue定义一个特定值,然后重用它,那么语法是这样的:
$blue: #3333FF;
a {
font-weight: bold;
color: $blue;
}https://stackoverflow.com/questions/17180655
复制相似问题