Answer the question
In order to leave comments, you need to log in
Isn't style.css overloading the class namespace in BEM fashion?
When the context is not used due to direct access to the desired block or element.
For example
<ul class="nav-menu nav-theme__name">
<li class="nav-menu__item"><a class="nav-menu__link" href="#">item</a></li>
<li class="nav-menu__item"><a class="nav-menu__link" href="#">item</a></li>
</ul>
Answer the question
In order to leave comments, you need to log in
BEM is not a dogma and only about css , like any other design pattern it helps to manage complexity, the limitation that can be seen is the subjective perception of the observer.
If I understand the question correctly, nothing prevents using global normalization (namely, normalization, not reset) for elements, and this makes the final blocks more independent of their environment. When the use of style rules for elements makes a block dependent on an element or context, it violates only one of the principles of the methodology on the implementation aspect of the block and vice versa. And only independently it is possible to make decisions whether it is worth doing it and how it can affect the overall process.
Complement by example if nav-theme__nameis a modifier with a value of name , then following the classic naming, nav-menu_theme_name (block_mod_value) would be correct.
The naming convention is specific and in this aspect it is important not to deviate from the agreements.
Additionally, I recommend looking at https://ru.bem.info/forum/?labels=css
And yet, using global styles (normalize/reset) contradicts the trailer: "A block is an independent component", more: experience and recommendation .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question