Skip to content

Instantly share code, notes, and snippets.

@luisrudge
Created May 15, 2015 23:13
Show Gist options
  • Save luisrudge/e3752737755b8d33ec4f to your computer and use it in GitHub Desktop.
Save luisrudge/e3752737755b8d33ec4f to your computer and use it in GitHub Desktop.
is this right according to BEM?
<aside class="sidebar">
<nav class="menu">
<div class="menu-item">
<a href="" class="menu-item__link">
<span class="menu-item__icon">
<i class="ion-ios-home-outline"></i>
</span>
<span class="menu-item__text">
Home
</span>
</a>
</div>
</nav>
</aside>
@luisrudge
Copy link
Author

so I can go from an element (menu__item) to a block again (menu-link)?

@bensmithett
Copy link

@luisrudge absolutely, you just want to keep any nested blocks independent of their parents (i.e. reduce the depth of applicability). So you don't want styles from the menu block leaking through to menu-item.

@luisrudge
Copy link
Author

awesome. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment