5 ms·
I'm not a fan of BEM either. It terribly feels like over-engineering and ignores certain principles of CSS. Often, much better clarity could be achieved simply
by blauditore 9y ago
I'm not a fan of BEM either. It terribly feels like over-engineering and ignores certain principles of CSS. Often, much better clarity could be achieved simply with better naming and structuring of elements.
- coldtea 9y ago>I'm not a fan of BEM either. It terribly feels like over-engineering and ignores certain principles of CSS. It's actually under-engineering (a brute force, hacky solution), and it ignores those principles of CSS (cascading for one) on purpose because they have been historically found to be more harm than good.
- Fifer82 9y agoSomething about it reminds me of being new to programming. var the_first_left_menu_item_animation_enter var the_second_left_menu_item_animation_enter What causes this problem? Does CSS not have any modular capability and that is why? Is it global by definition? Not really sure what I am trying to say.
- coldtea 9y ago>What causes this problem? Does CSS not have any modular capability and that is why? Is it global by definition? It has crappy scoping and modularity rules.
- albedoa 9y ago> Often, much better clarity could be achieved simply with better naming and structuring of elements. I'm always interested in seeing examples of good class naming and structure if you have some available. BEM is more about specificity, modularity, and namespacing than it is about clarity (which many think it also achieves).
- blauditore 9y agoWell, I disagree with some assumptions it makes. For example, `.button--active` should help avoiding collisions with other elements using the same modifier `.active`. But I would argue that either there are shared styling rules between such "colliding" elements, or the modifier is named poorly (i.e. shouldn't be as generic as `active`.