Skip to content

Latest commit

 

History

History
54 lines (41 loc) · 1.08 KB

File metadata and controls

54 lines (41 loc) · 1.08 KB

syntax-string-no-invalid

Disallow invalid syntax strings.

@property --foo {
  syntax: "<color>";
/**       ↑
 * Syntax strings like this */
}

Syntax strings are used for the syntax descriptor value of the @property at-rule. This rule checks their grammar and flags unsupported type names.

You can check §5.1 “Supported Names” of the CSS Properties & Values API for a list of valid syntax component names.

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

Options

true

The following patterns are considered problems:

@property --foo {
  syntax: "<bar>";
}
@property --foo {
  syntax: "<alpha-value>";
}

The following patterns are not considered problems:

@property --foo {
  syntax: "<color>";
}
@property --foo {
  syntax: "<length> | <color>";
}