CSS Class Names
Use kebab-case for all class names (e.g.,
.submit-button,.order-list).Adopt the BEM methodology (Block, Element, Modifier) to maintain scalable and predictable styles:
Block:
.blockElement:
.block__elementModifier:
.block--modifieror.block__element--modifier
Do not use camelCase or PascalCase in CSS.
Avoid ID selectors (
#header) for styling; use classes only.Prefix utility or global class names with the project/team identifier to avoid conflicts (e.g.,
.app-).
Examples:
.user-profile {
&__avatar {
border-radius: 50%;
}
&__avatar--large {
width: 100px;
height: 100px;
}
&__name {
font-weight: bold;
}
}
06 мая 2026