selector-pseudo-class-disallowed-list
指定不允许的伪类选择器的列表。
¥Specify a list of disallowed pseudo-class selectors.
a:hover {}
/** ↑
* This pseudo-class selector */
该规则忽略使用变量插值的选择器,例如 :#{$variable} {}
。
¥This rule ignores selectors that use variable interpolation e.g. :#{$variable} {}
.
message
次要选项 可以接受该规则的参数。
¥The message
secondary option can accept the arguments of this rule.
选项
¥Options
Array<string>
["array", "of", "unprefixed", "pseudo-classes", "/regex/"]
鉴于:
¥Given:
{
"selector-pseudo-class-disallowed-list": ["hover", "/^nth-/"]
}
以下模式被视为问题:
¥The following patterns are considered problems:
a:hover {}
a:nth-of-type(5) {}
a:nth-child(2) {}
以下模式不被视为问题:
¥The following patterns are not considered problems:
a:focus {}
a:first-of-type {}