syntax-string-no-invalid
禁止无效语法字符串。
¥Disallow invalid syntax strings.
@property --foo {
syntax: "<color>";
/** ↑
* Syntax strings like this */
}
语法字符串用于 @property
at-rule 的 syntax
描述符值。此规则检查其语法并标记不支持的类型名称。
¥Syntax strings are used for the syntax
descriptor value of the @property
at-rule. This rule checks their grammar and flags unsupported type names.
你可以查看 §5.1 CSS 属性和值 API 的“支持的名称” 以获取有效语法组件名称列表。
¥You can check §5.1 “Supported Names” of the CSS Properties & Values API for a list of valid syntax component names.
message
次要选项 可以接受该规则的参数。
¥The message
secondary option can accept the arguments of this rule.
选项
¥Options
true
以下模式被视为问题:
¥The following patterns are considered problems:
@property --foo {
syntax: "<bar>";
}
@property --foo {
syntax: "<alpha-value>";
}
以下模式不被视为问题:
¥The following patterns are not considered problems:
@property --foo {
syntax: "<color>";
}
@property --foo {
syntax: "<length> | <color>";
}