Skip to content

Instantly share code, notes, and snippets.

@hyfydistro
Forked from gokulkrishh/BEM.md
Created July 16, 2019 06:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hyfydistro/9bdcdf2be8f895b7fbd35ff7a3e81286 to your computer and use it in GitHub Desktop.
Save hyfydistro/9bdcdf2be8f895b7fbd35ff7a3e81286 to your computer and use it in GitHub Desktop.
BEM Approach - http://getbem.com/naming/

BEM - Block, Element, Modifier

1. Block
----------------------------------------------

Eg: menu

<ul class="menu"></ul>

2. Elements
----------------------------------------------

Eg: menu__list

<ul class="menu">
  <li class="menu__list"></li>
</ul>

3. Modifiers
----------------------------------------------

Eg: menu--active

<ul class="menu">
  <li class="menu__list"></li>
  <li class="menu__list menu--active"></li>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment