And I want to apply this idea to my next project but when I get the check on getbem.com, It says is bad when use modifier alone
Good
<div class="block block--mod">...</div>
<div class="block block--size-big
block--shadow-yes">...</div>
Bad
<div class="block--mod">...</div>
meanwhile, in BEVM idea, we can use modifier alone in an element. Does anyone have a suggestion?
答案 0 :(得分:0)
BEM反对没有块类本身的修饰符。他们将修改现有的东西。
一个块可以同时有很多不同的修饰符(我们需要避免每个修饰符重复基本的内容),并且可以在运行时添加或删除它们。因此,应该始终可以添加或删除修改器的实体(块或元素)。
有关更多信息,请参阅https://en.bem.info/methodology/faq/#how-to-make-global-modifiers-for-blocks