- cross-posted to:
- lemmyshitpost
- [email protected]
- cross-posted to:
- lemmyshitpost
- [email protected]
Some frontend developers know the BEM methodology as a naming convention for CSS and they create a disgusting #webcomponents. I’ve explain the essence of BEM and shown the benefits for your frontend projects.
Feel free to share it with a people who tells you “i use CSS-modules, so i no needs a BEM”
I do agree.
Given that naming the element only and selecting for the hierarchy gives you completely equivalent functionality, with completely equivalent selectors, I do prefer the option that keeps the names more generic.
BEM always looked like a hack to increase the CSS selection performance, and not something that adds architectural value. And well, we don’t need hacks of that level anymore, browsers are well optimized nowadays.