Skip to content

Instantly share code, notes, and snippets.

@yavorski
Created October 5, 2013 13:42
Show Gist options
  • Save yavorski/6841100 to your computer and use it in GitHub Desktop.
Save yavorski/6841100 to your computer and use it in GitHub Desktop.
Various css naming conventions
/* # Structured class names by nicolasgallagher */
/* Utility */
.u-utilityName {}
/* State-utility */
.u-isStateName {}
/* Component */
.ComponentName {}
/* Component modifier */
.ComponentName--modifierName {}
/* Component descendant */
.ComponentName-descendant {}
/* Component descendant modifier */
.ComponentName-descendant--modifierName {}
/* Component state (scoped to component) */
.ComponentName.is-stateOfComponent {}
/* Component mixin (ancestor style dependencies) */
.with-ComponentName {}
/* -------------------------------------------------------- */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment