Sass 不会因为“隐形"而编译错误 [英] Sass won't compile because of an "invisible" error

查看:39
本文介绍了Sass 不会因为“隐形"而编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为一个已有的项目实施指南针,该项目的 CSS 超过 3800 行.

这是它触发的错误:

<预><代码>>>>在 19:47:43 检测到的更改为:style.scss错误 sass/style.scss(第 3807 行:""之后的 CSS 无效:预期的{",是")覆盖 css/style.css

这是来自第 3800 行:

.shake:hover {显示:块;位置:相对;}.shake.inline{显示:内联块}

知道我在这里遗漏了什么吗?

-sassbin-

http://sassbin.com/gist/7324262/

-编辑-

通过删除所有空格:

第 3800 行:

.shake:hover {display:block;position:relative;}.shake.inline{display:inline-block;}

错误更改为:

覆盖css/style.css>>>在 20:11:12 检测到的更改为:style.scss错误 sass/style.scss(第 3800 行:...line-block;}"之后的 CSS 无效:预期的{",是")

解决方案

如果你看看你的 sassbin,它实际上会告诉你问题出在哪里.最后一个右花括号后面有一个隐藏字符,刚好看起来像空格或换行符(sassbin显示为中点).

I am implementing compass to a already existing project which has a CSS with over 3800 lines.

This is the error it fires:

>>> Change detected at 19:47:43 to: style.scss
    error sass/style.scss (Line 3807: Invalid CSS after "​": expected "{", was "")
overwrite css/style.css

This is from line 3800:

.shake:hover {
    display:block;
    position:relative;
        
}
.shake.inline{
    display:inline-block 
}

Any idea of what am I missing here?

​-sassbin-

http://sassbin.com/gist/7324262/

-EDIT-

By removing all whitespaces:

line 3800:

.shake:hover {display:block;position:relative;}.shake.inline{display:inline-block;}​

Error changed to:

overwrite css/style.css 
>>> Change detected at 20:11:12 to: style.scss
    error sass/style.scss (Line 3800: Invalid CSS after "...line-block;}​": expected "{", was "")

解决方案

If you look at your sassbin, it is actually showing you where the problem is. There is a hidden character after the last closing curly brace, and it happens to look like a space or newline (sassbin displays it as a middot).

这篇关于Sass 不会因为“隐形"而编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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