Block
.snake_caseA component is named for what it is, never for what it looks like. .user_card, not .bg-white.rounded-xl.p-4.shadow-sm.
That reads like taste until the design changes. The moment “white” becomes “white in light mode and stone-900 in dark mode,” a class called bg-white is a lie – and it is a lie in forty files at once. .user_card was never going to be wrong, because a card is still a card.
Why snake_case? Because user_card is one double-click and user-card is two. You will select this token thousands of times over the life of the project. Optimize for the thousands.
That identity lives on a class. HTML id is a document hook – skip links, fragment URLs, getElementById – and it is not a styling API. An ID selector is specificity 1,0,0: no class combination can override it without reaching for !important or another ID. You do not need a second identity system, and you definitely do not need one that cannot be reused.
/* The name survives every redesign. */
.user_card {
padding: var(--space-5);
border: 1px solid var(--border-base);
background: var(--bg-surface);
}