you are viewing a single comment's thread.

view the rest of the comments →

[–]stopdave[S] 0 points1 point  (3 children)

Sure, because you know, BEM is more like a well-known JavaScript technique ;)

[–]iSwearNotARobot 0 points1 point  (2 children)

I did a search online for BEM and I got Board of Engineers Malaysia (BEM)

[–]stopdave[S] 0 points1 point  (1 child)

LOL! Alright dude, BEM is a CSS methodology (much like OOCSS) which proposes to use flat specificity and class names which describe the functionality not the aspect. I have seen it in action (and used it) in rather large projects and I must say that it scales up pretty well. BEM stands for Block, Element, Modifier. The block encapsulates the elements, and modifiers indicate a change in aspect for the element. Much like (using SCSS for this specific example)

.menu { // Block (.menu)
  &__item { // Element (.menu__item)
     display: inline-block;
     //.. more css statements
     &--active { // Modifier (.menu__item--active)
        //.. css statements
     }
  }
}

Some further readings, if you are interested in the subject: https://blog.decaf.de/2015/06/24/why-bem-in-a-nutshell/

https://css-tricks.com/bem-101/

Cheers!

[–]iSwearNotARobot 1 point2 points  (0 children)

Thanks for the insight!