Even though CSS syntax is case-insensitive (except for variables), sharing some style conventions is a key point to make it possible for a team to efficiently collaborate.

This rule allows to check that all properties, functions and variables are written in lowercase.

Noncompliant Code Example

@CHARSET "UTF-8"; /* Noncompliant @-rule keyword */

.mybox {
  COLOR: blue; /* Noncompliant property */
}

.mybox {
  color: RGB(255,255,255); /* Noncompliant function */
}

:root {
  --MyVar: red; /* Noncompliant variable */;
}

Compliant Solution

@charset "UTF-8";

.mybox {
  color: blue;
}

.mybox {
  color: rgb(255,255,255);
}

:root {
  --myvar: red;
}

Exceptions

Less interpolated properties are not checked for lowercase. For instance, the following piece of code does not raise an issue:

.mybox {
  @{BG}-color: green;
}