Here's example:
<div class="rate-calc">
<div class="rate-calc__internet internet">
<div class="internet__title">Some title</div>
<div class="internet__text">Lorem ipsum dolar sit amet</div>
</div>
</div>
Is it correct BEM usage? Nesting block in a block still seems unclear for me.
@heihachi88 Yes, that's the right way.
@tadatuta thanks,
rate-calc__internet
means that i can't reuse that block anywhere, but only insiderate-calc
, right?Also why some people using a single dash instead of underscore, when referring to an modificator, e.g.:
rate-calc__internet-active
, shouldn't it be like so:rate-calc__internet_active
?yes
There are few different naming conventions and all of them are valid. See https://en.bem.info/methodology/naming-convention/#alternative-naming-schemes
my question is:
or
i think which "item" class only is to do a block to "link" and has no some other use...