DEV Community

Discussion on: Friends with BEM-efits

develoger profile image

BEM is still very relevant. I really dislike when people say how it is old, without giving details on why one should not use it and what are alternatives in their opinion. Email as technology exist for decades and nobody states something like that!

Anyway, BEM is powerful mainly because of M. Modifiers are what makes the difference IMHO.

One thing I would strongly advise is not to nest Modifiers in SASS nor to nest anything else other than pseudo elements or :hover,:focus...
Nesting makes maintainability hard and if we really write CMP based apps, then not nesting will not cause bloated codebase.

Btw. you have one type on article: .block--modifier[] instead of .block--modifier {}

Will share your article on Twitter, really nice to see people love BEM :)