解析期间的 CSSOMParser 错误 [英] CSSOMParser errors during parsing

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

问题描述

我在解析 css 文件时遇到以下错误 all.css

I am getting the following errors while parsing css file all.css

null [1:1763] Error in style rule. Invalid token "!". Was expecting one of: <S>, "}", ",", ";", "/", "+", "-", <HASH>, <STRING>, <URI>, <IMPORTANT_SYM>, "inherit", <EMS>, <EXS>, <LENGTH_PX>, <LENGTH_CM>, <LENGTH_MM>, <LENGTH_IN>, <LENGTH_PT>, <LENGTH_PC>, <ANGLE_DEG>, <ANGLE_RAD>, <ANGLE_GRAD>, <TIME_MS>, <TIME_S>, <FREQ_HZ>, <FREQ_KHZ>, <DIMEN>, <PERCENTAGE>, <NUMBER>, "rgb(", <FUNCTION>, <IDENT>, <UNICODERANGE>.
null [1:1763] Ignoring the following declarations in this rule.
null [1:4352] Error in style rule. Invalid token "!". Was expecting one of: <S>, "}", ",", ";", "/", "+", "-", <HASH>, <STRING>, <URI>, <IMPORTANT_SYM>, "inherit", <EMS>, <EXS>, <LENGTH_PX>, <LENGTH_CM>, <LENGTH_MM>, <LENGTH_IN>, <LENGTH_PT>, <LENGTH_PC>, <ANGLE_DEG>, <ANGLE_RAD>, <ANGLE_GRAD>, <TIME_MS>, <TIME_S>, <FREQ_HZ>, <FREQ_KHZ>, <DIMEN>, <PERCENTAGE>, <NUMBER>, "rgb(", <FUNCTION>, <IDENT>, <UNICODERANGE>.
null [1:4352] Ignoring the following declarations in this rule.
null [1:4435] Error in style rule. Invalid token "-". Was expecting one of: <S>, "}", ";", <IDENT>.
null [1:4435] Ignoring the following declarations in this rule.
null [1:10349] Error in style rule. Invalid token "-". Was expecting one of: <S>, "}", ";", <IDENT>.
null [1:10349] Ignoring the following declarations in this rule.
null [1:12131] Error in style rule. Invalid token "!". Was expecting one of: <S>, "}", ",", ";", "/", "+", "-", <HASH>, <STRING>, <URI>, <IMPORTANT_SYM>, "inherit", <EMS>, <EXS>, <LENGTH_PX>, <LENGTH_CM>, <LENGTH_MM>, <LENGTH_IN>, <LENGTH_PT>, <LENGTH_PC>, <ANGLE_DEG>, <ANGLE_RAD>, <ANGLE_GRAD>, <TIME_MS>, <TIME_S>, <FREQ_HZ>, <FREQ_KHZ>, <DIMEN>, <PERCENTAGE>, <NUMBER>, "rgb(", <FUNCTION>, <IDENT>, <UNICODERANGE>.
null [1:12131] Ignoring the following declarations in this rule.
null [1:17335] Error in style rule. Invalid token "-". Was expecting one of: <S>, "}", ";", <IDENT>.
null [1:17335] Ignoring the following declarations in this rule.
null [1:20115] Error in style rule. Invalid token "-". Was expecting one of: <S>, "}", ";", <IDENT>.
null [1:20115] Ignoring the following declarations in this rule.
null [1:20499] Error in style rule. Invalid token "-". Was expecting one of: <S>, "}", ";", <IDENT>.
null [1:20499] Ignoring the following declarations in this rule.
null [1:22593] Error in style rule. Invalid token "-". Was expecting one of: <S>, "}", ";", <IDENT>.
null [1:22593] Ignoring the following declarations in this rule.
null [1:23137] Error in expression. Invalid token "=". Was expecting one of: <S>, ",", "/", "+", "-", <HASH>, <STRING>, ")", <URI>, "inherit", <EMS>, <EXS>, <LENGTH_PX>, <LENGTH_CM>, <LENGTH_MM>, <LENGTH_IN>, <LENGTH_PT>, <LENGTH_PC>, <ANGLE_DEG>, <ANGLE_RAD>, <ANGLE_GRAD>, <TIME_MS>, <TIME_S>, <FREQ_HZ>, <FREQ_KHZ>, <DIMEN>, <PERCENTAGE>, <NUMBER>, "rgb(", <FUNCTION>, <IDENT>, <UNICODERANGE>.
null [1:27252] Error in style rule. Invalid token "-". Was expecting one of: <S>, "}", ";", <IDENT>.
null [1:27252] Ignoring the following declarations in this rule.
null [1:28495] Error in style rule. Invalid token "!". Was expecting one of: <S>, "}", ",", ";", "/", "+", "-", <HASH>, <STRING>, <URI>, <IMPORTANT_SYM>, "inherit", <EMS>, <EXS>, <LENGTH_PX>, <LENGTH_CM>, <LENGTH_MM>, <LENGTH_IN>, <LENGTH_PT>, <LENGTH_PC>, <ANGLE_DEG>, <ANGLE_RAD>, <ANGLE_GRAD>, <TIME_MS>, <TIME_S>, <FREQ_HZ>, <FREQ_KHZ>, <DIMEN>, <PERCENTAGE>, <NUMBER>, "rgb(", <FUNCTION>, <IDENT>, <UNICODERANGE>.
null [1:28495] Ignoring the following declarations in this rule.
null [1:32022] Error in style rule. Invalid token "-". Was expecting one of: <S>, "}", ";", <IDENT>.
null [1:32022] Ignoring the following declarations in this rule.
null [1:33926] Error in style rule. Invalid token "-". Was expecting one of: <S>, "}", ";", <IDENT>.
null [1:33926] Ignoring the following declarations in this rule.
null [1:34660] Error in style rule. Invalid token "-". Was expecting one of: <S>, "}", ";", <IDENT>.
null [1:34660] Ignoring the following declarations in this rule.
null [1:36410] Error in style rule. Invalid token "-". Was expecting one of: <S>, "}", ";", <IDENT>.
null [1:36410] Ignoring the following declarations in this rule.
null [1:36624] Error in style rule. Invalid token "-". Was expecting one of: <S>, "}", ";", <IDENT>.
null [1:36624] Ignoring the following declarations in this rule.
null [1:37378] Error in style rule. Invalid token "-". Was expecting one of: <S>, "}", ";", <IDENT>.
null [1:37378] Ignoring the following declarations in this rule.
null [1:39110] Error in style rule. Invalid token "-". Was expecting one of: <S>, "}", ";", <IDENT>.
null [1:39110] Ignoring the following declarations in this rule.
null [1:40536] Error in style rule. Invalid token "-". Was expecting one of: <S>, "}", ";", <IDENT>.
null [1:40536] Ignoring the following declarations in this rule.
null [1:41061] Error in style rule. Invalid token "-". Was expecting one of: <S>, "}", ";", <IDENT>.
null [1:41061] Ignoring the following declarations in this rule.
null [1:41487] Error in style rule. Invalid token "-". Was expecting one of: <S>, "}", ";", <IDENT>.
null [1:41487] Ignoring the following declarations in this rule.
null [1:45987] Error in expression. Invalid token "=". Was expecting one of: <S>, ",", "/", "+", "-", <HASH>, <STRING>, ")", <URI>, "inherit", <EMS>, <EXS>, <LENGTH_PX>, <LENGTH_CM>, <LENGTH_MM>, <LENGTH_IN>, <LENGTH_PT>, <LENGTH_PC>, <ANGLE_DEG>, <ANGLE_RAD>, <ANGLE_GRAD>, <TIME_MS>, <TIME_S>, <FREQ_HZ>, <FREQ_KHZ>, <DIMEN>, <PERCENTAGE>, <NUMBER>, "rgb(", <FUNCTION>, <IDENT>, <UNICODERANGE>.
null [1:45992] Error in style rule. Invalid token "position". Was expecting one of: "}", ";".
null [1:45992] Ignoring the following declarations in this rule.
null [1:46761] Error in style rule. Invalid token "-". Was expecting one of: <S>, "}", ";", <IDENT>.
null [1:46761] Ignoring the following declarations in this rule.
null [1:50353] Error in style rule. Invalid token "-". Was expecting one of: <S>, "}", ";", <IDENT>.
null [1:50353] Ignoring the following declarations in this rule.
null [1:51070] Error in style rule. Invalid token "-". Was expecting one of: <S>, "}", ";", <IDENT>.
null [1:51070] Ignoring the following declarations in this rule.

它看起来与损坏的 css 标签有关.有人可以澄清一下吗?我正在使用文件中的 css 规则来找出 html 页面(链接到 css)上的某些元素.这些错误实际上会影响 css 规则的解析,从而影响网页上 html 元素的分析吗?(我确定它会,但希望它不会)

It looks related to broken css tags. Can somebody please clarify on this? I am using the css rules in the file to figure out certain elements on the html page (which linked to the css). Will these errors actually effect the parsing of the css rules and hence the profiling of the html elements on the web page? (I am sure it does but hope it does not)

提前致谢..

推荐答案

也许是因为您使用了非标准 CSS 规则(如!ie7")或供应商特定属性(如-moz-border-radius")?

Maybe because you're using non-standard CSS rules like "!ie7", or vendor specific properties like "-moz-border-radius"?

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

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