Skip to main content

at-rule-prelude-no-invalid

Disallow invalid preludes for at-rules.

@property --foo {}
/** ↑
* Preludes like this */

This rule considers preludes for at-rules defined within the CSS specifications, up to and including Editor's Drafts, to be valid.

You can filter the CSSTree Syntax Reference to find out what preludes are valid for an at-rule.

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

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

This rule overlaps with:

You can either turn off the rules or configure them to ignore the overlaps.

Prior art:

Options

true

The following patterns are considered problems:

@property foo {}
@font-palette-values foo {}

The following patterns are not considered problems:

@property --foo {}
@font-palette-values --foo {}

Secondary Options

ignoreAtRules: ["/regex/", /regex/, "string"]

Given:

["property", "/^font-/"]

The following patterns are not considered problems:

@property foo;
@font-palette-values foo {}