SASS 无效的 css 错误 [英] SASS Invalid css error

查看:68
本文介绍了SASS 无效的 css 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始使用 sass 并安装了 prepros.我试图编译一个 .scss 文件并得到一个错误:

语法错误:color:"之后的 CSS 无效:预期的表达式(例如 1px,粗体),是@blue;"

.scss 代码:

.footer {清楚:两者;背景色:@blue;

}

我安装了 Ruby 和 prepros.

解决方案

SCSS 使用 $ 来表示变量,所以它应该是 background-color: $blue;

I just started with sass and installed prepros. I tried to compile an .scss file and got an error:

Syntax error: Invalid CSS after " color: ": expected expression (e.g. 1px, bold), was "@blue;"

The .scss code:

.footer {
clear: both;
background-color: @blue;

}

I installed Ruby, and prepros.

解决方案

SCSS uses $ to denote variables so it should be background-color: $blue;

这篇关于SASS 无效的 css 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆