syntax-string-no-invalid
Disallow invalid syntax strings.
@property --foo { syntax: "<color>";/** ↑ * Syntax strings like this */}Use this rule to avoid custom properties that never register. An invalid syntax string invalidates the whole @property rule.
Syntax strings are used for the syntax descriptor value of the @property at-rule. This rule reports invalid syntax strings and unsupported type names.
You can check §5.1 “Supported Names” of the CSS Properties & Values API for a list of valid syntax component names.
This rule supports 1 message argument: the invalid syntax string.
Options
Section titled “Options”{ "syntax-string-no-invalid": 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>";}