Skip to main content

custom-property-pattern

Specify a pattern for custom properties.

a { --foo-: 1px; }
/** ↑
* The pattern of this */

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

Options

string

Specify a regex string not surrounded with "/".

Given:

{
"custom-property-pattern": "foo-.+"
}

The following patterns are considered problems:

:root { --boo-bar: 0; }

The following patterns are not considered problems:

:root { --foo-bar: 0; }