Sass无效的CSS错误:“预期表达式” [英] Sass Invalid CSS Error: "expected expression"
问题描述
我刚刚关注 Sass教程。由于某些原因,虽然Sass文件没有正确生成css。终端说css无效,但我很确定不是。我也试过改变它,以防万一有问题...
我做错了什么?
Sass版本:Sass 3.1.10
错误讯息:
错误sass / test.sass(第3行:80%后的CSS无效:
预期表达式(例如1px,bold)
.sass文件内容:
/ * style.scss * /
#navbar {
width:80%;
height:23px;
}
根据您的错误讯息 error sass / test.sass
)我可以告诉你对Scss文件使用 .sass
扩展。将文件名更改为 style.scss
。
Sass和Scss使用两种不同的不兼容语法。 >
I've just been following the Sass tutorial. For some reason though the Sass file is not correctly generating the css. The terminal says the css is invalid but I'm pretty sure it's not. I've tried changing it too just in case there was a problem...
What have I done wrong?
Sass Version: Sass 3.1.10
Error message:
error sass/test.sass (Line 3: Invalid CSS after "80%":
expected expression (e.g. 1px, bold), was ";")
.sass file contents:
/* style.scss */
#navbar {
width: 80%;
height: 23px;
}
Based on your error message (error sass/test.sass
) I can tell you're using the .sass
extension for a Scss file. Change your file name to style.scss
.
Sass and Scss use two different and incompatible syntaxes.
这篇关于Sass无效的CSS错误:“预期表达式”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!