In the BEM approach, if you have a block named "menu" and an element inside it named "item", how would you represent it using a class?

  • .menu .item
  • .menu item
  • .menu-item
  • .menu_item
In the BEM (Block Element Modifier) methodology, elements are represented with a single hyphen - connecting the block and element names. Therefore, the correct way to represent an element named "item" inside a block named "menu" is by using the class .menu-item.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *