Especially if you're writing CSS with other people, keep things consistent so everyone is on the same page.
Create formal guidelines to improve development productivity with CSS by organizing code and making it readable, and exchangeable among developers without a loss of productivity while “diving-in”.
Naming convention
Compose names using hyphen “-” separator. It is the same separator
than the CSS language.
For example, use composed names like:
/* CORRECT */
sales-order
and not composed names like:
/* FORBIDDEN !!! */
salesOrder,
SalesOrder,
sales_order
Use full English descriptions for names. Avoid using abbreviations.
For example, use names like:
/* CORRECT */
.first-name,
.last-name,
.middle-initial
rather than the shorter versions:
/* FORBIDDEN !!! */
.f-name,
.last-n,
.m-i