rule-nesting-at-rule-required-list
要求规则嵌套在特定的 at 规则中。
¥Require rules to be nested in specific at-rules.
a { color: red; }
/** ↑
* This rule */
选项
¥Options
Array<string | RegExp>
鉴于:
¥Given:
{
"rule-nesting-at-rule-required-list": ["layer", "/^--foo-/"]
}
以下模式被视为问题:
¥The following patterns are considered problems:
a { color: red; }
@media all {
a { color: red; }
}
a {
@layer {
color: red;
}
}
以下模式不被视为问题:
¥The following patterns are not considered problems:
@layer {
a { color: red; }
}
@--foo-bar {
a { color: red; }
}
@--foo-baz {
a { color: red; }
}
@font-face {
font-family: "foo";
}