Skip to content

at-rule-descriptor-value-no-unknown

Disallow unknown values for descriptors within at-rules.

@counter-style foo {
system: unknown;
/** ↑
* Values like this */
}

Use this rule to avoid values unknown to their descriptor. Browsers ignore them, so the at-rule behaves as if the descriptor were missing.

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

You can filter the CSSTree Syntax Reference to find out what values are known for a descriptor of an at-rule, and use the languageOptions configuration property to extend it.

This rule checks descriptor values within at-rules. You can use declaration-property-value-no-unknown to disallow unknown values for properties within declarations, and at-rule-descriptor-no-unknown to disallow unknown descriptors for at-rules.

This rule supports 2 message arguments: the descriptor and the unknown value.

Prior art:

{
"at-rule-descriptor-value-no-unknown": true
}

The following patterns are considered problems:

@counter-style foo {
system: unknown;
}
@property --foo {
syntax: unknown;
}

The following patterns are not considered problems:

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