手写笔ParseError:预计“缩进”,得到“outdent”

手写笔ParseError:预计“缩进”,得到“outdent”

Unable to compile Stylus file app/css/app.styl to CSS: ParseError: app/css/provider.styl:22 18| padding-top: 20px 19| text-align: center 20| border-bottom: 1px solid white 21| margin-bottom: 25px > 22| 23| .aclass 24| display: none 25| expected "indent", got "outdent" 

我在这里做错了什么? 感谢有关此错误的任何信息!

我倾向于从其他库转换CSS文件时得到这个。 通常,它必须处理包含filter属性的附近规则。

当规则包含任何Microsoft“progid”时,您需要转义整个值。

 filter: unqoute("progid:DXImageTransform.Microsoft.gradient(startColorstr='#2b80ff', endColorstr='#1d66d3', GradientType=0)") -ms-filter: unquote("progid:DXImageTransform.Microsoft.Alpha(Opacity=50)") 

最后,Stylus有一个内置的alpha函数,所以你需要像这样用引号将它转义出来:

 filter: unquote("alpha(opacity=50)") 

发现一些隐藏的白色空间

:/ 小心!

我已经有这个问题,当我混合使用空格缩进和制表符缩进。

一个很好的方法来看看你是否使用Sublime 2来select文本 – 标签是条和空格是所选文本中的点。

最后,我将空格转换为制表符。

我得到这个错误,因为我有一个以数字开头的类。

 .1080spacer z-index 1 

等等。错误出现在下一个类声明行。 一旦我把这个数字移到课程结束时,错误就消失了。 喜欢这个:

 .spacer1080 z-index 1 

这为我解决了。