Skip to main content

at-rule-descriptor-no-unknown

禁止在规则中使用未知描述符。

¥Disallow unknown descriptors for at-rules.

@counter-style foo {
unknown-descriptor: cyclic;
/** ↑

* Descriptors like this */
}

此规则认为 CSS 规范中定义的描述符(包括编辑草稿)是已知的。

¥This rule considers descriptors defined in the CSS Specifications, up to and including Editor's Drafts, to be known.

你可以过滤 CSSTree 语法参考 以找出已知的规则描述符。

¥You can filter the CSSTree Syntax Reference to find out what descriptors are known for an at-rule.

此规则仅适用于 CSS。你不应该为类似 CSS 的语言(例如 SCSS 或 Less)启用它。

¥This rule is only appropriate for CSS. You should not turn it on for CSS-like languages, such as SCSS or Less.

message 次要选项 可以接受该规则的参数。

¥The message secondary option can accept the arguments of this rule.

此规则检查 at-rules 中的描述符。要检查属性,你可以使用 property-no-unknown 规则。

¥This rule checks descriptors within at-rules. To check properties, you can use the property-no-unknown rule.

现有技术:

¥Prior art:

选项

¥Options

true

以下模式被视为问题:

¥The following patterns are considered problems:

@counter-style foo {
unknown-descriptor: cyclic;
}
@property --foo {
unknown-descriptor: "<color>";
}

以下模式不被视为问题:

¥The following patterns are not considered problems:

@counter-style foo {
system: cyclic;
}
@property --foo {
syntax: "<color>";
}