My convention for CSS naming is:
- For a component, pascal-case (capitalized + camel-case) the root class name,
Button - For any other element classes within that component, use the component name followed by a dash
-and then the element'c class name in dash caseicon, so Button's icon would beButton-icon. - For modifiers, meaning classes that override styles from a base class name, use the component name followed by two dashes
--and then the class name in dash caseshopping-cart, so Button's icon style overrides for the shopping cart icon would beButton-icon--shopping-cart.
A button component with an icon and text:
<button class='Button Button--primary'>