selector-pseudo-class-allowed-list
許可する疑似クラスセレクターのリストを指定します。
a:hover {}
/** ↑
* This pseudo-class selector */
このルールは、変数補間を使用するセレクター(例::#{$variable} {}
)を無視します。
message
セカンダリ オプションは、このルールの引数を受け入れることができます。
オプション
array|string|regex
: ["array", "of", "unprefixed", /pseudo-classes/, "/regex/"]|"pseudo-class"|"/regex/"|/regex/
文字列が "/"
で囲まれている場合(例:"/^nth-/"
)、正規表現として解釈されます。これにより、たとえば、/^nth-/
は nth-child
、nth-last-child
、nth-of-type
などに一致するように、ショートハンドを簡単にターゲットにできます。
与えられた
["hover", "/^nth-/"]
以下のパターンは問題と見なされます
a:focus {}
a:first-of-type {}
以下のパターンは問題とは見なされません
a:hover {}
a:nth-of-type(5) {}
a:nth-child(2) {}