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.
@CHARSET "UTF-8"; /* Noncompliant @-rule keyword */
.mybox {
COLOR: blue; /* Noncompliant property */
}
.mybox {
color: RGB(255,255,255); /* Noncompliant function */
}
:root {
--MyVar: red; /* Noncompliant variable */;
}
@charset "UTF-8";
.mybox {
color: blue;
}
.mybox {
color: rgb(255,255,255);
}
:root {
--myvar: red;
}
Less interpolated properties are not checked for lowercase. For instance, the following piece of code does not raise an issue:
.mybox {
@{BG}-color: green;
}