As is known, BEM consists of blocks, elements and modifiers.
Take the blocks. They are offered to celebrate a separate class.
<div class="x-block> ΠΡΡΠΊΠΈΠΉ Π΄ΠΈΠ·Π°ΠΉΠ½ </div> But the block is essentially a component, it can and should be set as a separate HTML element, as it has long been implemented in every Angular and React.
<x-block> ΠΡΡΠΊΠΈΠΉ Π΄ΠΈΠ·Π°ΠΉΠ½ </x-block> With elements of nothing interesting.
<x-block> <x-block_element1> Π’Π΅ΠΊΡΡ </x-block_element1> <x-block_element2> ΠΡΠ΅ ΡΠ΅ΠΊΡΡ </x-block_element2> </x-block> But real joy comes with modifiers! After all, this is nothing but arguments. Instead of insane class constructions.
<x-block> <!-- ΠΠ»Ρ boolean ΠΌΠΎΠ΄ΠΈΡΠΈΠΊΠ°ΡΠΎΡΠΎΠ² --> <x-block_element1 mod1>ΠΡΡΠΊΠΈΠ΅ Π΄ΠΈΠ·Π°ΠΉΠ½Ρ</x-block_element1> <!-- ΠΠ»Ρ ΠΌΠΎΠ΄ΠΈΡΠΈΠΊΠ°ΡΠΎΡΠΎΠ² ΡΠΎ Π·Π½Π°ΡΠ΅Π½ΠΈΠ΅ΠΌ --> <x-block_element2 mod2="value">ΠΡΠ°ΠΉΠ½Π΅ ΡΠ°Π·Π½ΠΎΠΎΠ±ΡΠ°Π·Π½ΡΠ΅</x-block_element2> </x-block> What's wrong with this approach? Why is it not used? I think BEM perfectly matches the ideas of ordinary tags. Maybe I do not know something? Maybe there are some problems with selectors?
