CSS属性在github中以红色突出显示 [英] CSS property is red highlighted in github
问题描述
SCSS文件中的touch-action
属性在Github diff中以红色突出显示.有什么原因吗?
The touch-action
property in a SCSS file is red highlighted in Github diff. Any reason why?
这是它的DOM:
推荐答案
如果出现语法错误,Github将突出显示这样的代码.它不是100%准确,并且实际上不是在运行您的代码.
Github will highlight code like this if there is a syntax error. It's not 100% accurate, and it's not actually running your code.
有时它将错过一个错误,有时它将突出显示不是错误的内容.但是,它仍然是一个方便的功能.
Sometimes it will miss an error, other times it will highlight something that isn't an error. It is however still a handy feature.
我可以想象,由于touch-action
并没有得到很好的支持,github使用它的语法检查器并没有意识到它,并认为它不是有效的属性.
I would imagine that as touch-action
is not very well supported, the syntax checker that github use it not aware of it and thinks that it is not a valid property.
如果代码有效,我将忽略它.
If the code works, I would just ignore it.
这篇关于CSS属性在github中以红色突出显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!