#selector-pseudo-class-blacklist

Specify a blacklist of disallowed pseudo-class selectors.

指定一个禁止使用的伪类选择器的黑名单。

  a:hover {}
/** ↑
 * These pseudo-class selectors */

This rule ignores selectors that use variable interpolation e.g. :#{$variable} {}.

该规则忽略使用变量插值的选择器,如,:#{$variable} {}

#Options

array|string|regex: ["array", "of", "unprefixed", "pseudo-classes" or "regex"]|"pseudo-class"|/regex/

If a string is surrounded with "/" (e.g. "/^nth-/"), it is interpreted as a regular expression. This allows, for example, easy targeting of shorthands: /^nth-/ will match nth-child, nth-last-child, nth-of-type, etc.

如果一个字符串被 "/" (如,"/^nth-/") 包围,它将被解释为一个正则表达式。例如,这将允许简单地匹配简写: /^nth-/ 将匹配 nth-childnth-last-childnth-of-type 等。

Given:

给出:

["hover", "/^nth-/"]

The following patterns are considered warnings:

以下模式被认为是个警告:

a:hover {}
a:nth-of-type(5) {}
a:nth-child(2) {}

The following patterns are not considered warnings:

以下模式正常:

a:focus {}
a:first-of-type {}