selector-id-pattern
指定 ID 选择器的模式。
¥Specify a pattern for ID selectors.
.foo, #bar.baz a, #hoo[disabled] { color: pink; }
/** ↑ ↑
* These ID selectors */
选项
¥Options
string
指定未用 "/" 括起来的正则表达式字符串。
¥Specify a regex string not surrounded with "/".
将检查 # 之后的选择器值。无需在你的模式中包含 #。
¥The selector value after # will be checked. No need to include # in your pattern.
鉴于:
¥Given:
{
"selector-id-pattern": "foo-[a-z]+"
}
以下模式被视为问题:
¥The following patterns are considered problems:
#foop {}
#foo-BAR {}
div > .zing + #foo-BAR {}
以下模式不被视为问题:
¥The following patterns are not considered problems:
#foo-bar {}
div > .zing + #foo-bar {}
.foop {}
[foo='bar'] {}