Shared coding conventions allow teams to collaborate efficiently. This rule checks that all CSS variable names match a provided regular expression.

Noncompliant Code Example

With format ^[a-z][-a-z0-9]*$:
--myColor: green; /* Noncompliant */
--my_color: green; /* Noncompliant */

Compliant Solution

With format ^[a-z][-a-z0-9]*$:
--my-color: green;

stylelint Related Rules