Choosing between SMACSS and BEM Methodology
SMACSS | BEM | |
---|---|---|
What it is | Style Guide and not a framework with lax naming convention | Style Guide with specific naming convention and have optional framework provisions |
Style Categories |
|
|
CSS Selectors | Ok to use tag and ID selectors on layout elements but not on modules | tag and ID selectors are prohibited, everything use `.class` selectors |
!important | Use sparingly and only on states | Unlikely because styles are namespaced in their blocks |
Theming | Themes have their own files that override the module styles | Themes are treated as modifiers |
CSS Media Queries | Placed next to the module it handles | Inside the block following its rule on reuse |