LeBlaireau
LeBlaireau

Reputation: 17467

Bem naming underscore, hyphen or camelcase in element names

I have an element call "user nav"

Currently I have

.header__user-nav

With a modifier

.header__user-nav--active

Is it better to use single underscores for element names

  .header__user_nav--active

or hyphens

  .header__user-nav--active

or camelcase

  .header__userNav--active

Upvotes: 3

Views: 4496

Answers (1)

tadatuta
tadatuta

Reputation: 2025

Actually it is just a matter of taste. See https://en.bem.info/methodology/naming-convention/#alternative-naming-schemes

Upvotes: 5

Related Questions