Skip to main content

selector-attribute-operator-allowed-list

指定允许的属性运算符的列表。

¥Specify a list of allowed attribute operators.

[target="_blank"] {}
/** ↑

* This operator */

message 次要选项 可以接受该规则的参数。

¥The message secondary option can accept the arguments of this rule.

选项

¥Options

Array<string>

["array", "of", "attribute-operators"]

鉴于:

¥Given:

{
"selector-attribute-operator-allowed-list": ["=", "|="]
}

以下模式被视为问题:

¥The following patterns are considered problems:

[class*="test"] {}
[title~="flower"] {}
[class^="top"] {}

以下模式不被视为问题:

¥The following patterns are not considered problems:

[target] {}
[target="_blank"] {}
[class|="top"] {}