刚刚决定学习 SASS,非常简单的东西,只是一个非常基本的文件无法编译。
这实际上是基本的:
$test: #ffffff;
命令:
sass test.sass
错误消息:
error: expected "
".
$test:#ffffff;
^
test.sass 1:14 root stylesheet
我不知道预期的“-预期在哪里?”是什么意思?
最佳答案
请将扩展名 test.sass
更改为 test.scss
。你可以走了。 100% :)
根据 sass-lang.com .
There are two syntaxes available for Sass. The first, known as SCSS (Sassy CSS) and used throughout this reference, is an extension of the syntax of CSS. This means that every valid CSS stylesheet is a valid SCSS file with the same meaning. In addition, SCSS understands most CSS hacks and vendor-specific syntax, such as IE's old filter syntax. This syntax is enhanced with the Sass features described below. Files using this syntax have the .scss extension.
The second and older syntax, known as the indented syntax (or sometimes just "Sass"), provides a more concise way of writing CSS. It uses indentation rather than brackets to indicate nesting of selectors, and newlines rather than semicolons to separate properties. Some people find this to be easier to read and quicker to write than SCSS. The indented syntax has all the same features, although some of them have slightly different syntax; this is described in the indented syntax reference. Files using this syntax have the .sass extension.
关于css - SASS 新手 - 未编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50392991/