Discussion on: Improve your CSS with these 5 principles

amlinarev profile image
Andrej Mlinarević

That is very true for BEM, but generally it's not a problem if you don't nest classes more than 2-3 levels.

I sometimes combine BEM with the "old ways" in order to not have deep nesting of BEM on complex elements. Works fine, still namespaced (but you need to have control of the whole project and be reasonable enough not to write a global ".specificelement" class.

.block__element--modifier .specificelement {}