Skip to content

Naming Conventions

In SpiraCSS, clearly separate structure (Block / Element) from Variant / State.

Block / Element / Utility

TypeNaming ruleExamples
Blockkebab-case, two words (default).hero-container, .feature-list
Elementexactly one word.title, .body
Utilityu- prefix.u-hidden, .u-sr-only

Terminology: a “word” refers to a naming segment. In kebab-case (the default), segments are hyphen-separated. For example, hero-container has two words.

  • A Block represents a UI component or section (a meaningful unit)
  • An Element is meaningful only within the Block (do not use it outside)
  • A Utility is a single-purpose helper class, not part of structure

Note: An Element is always one word. Even if elementCase is set to camel or pascal, do not use multi-word names.

Prioritize clarity and readability over brevity.