What's common use when using BEM? I can't find this anywhere..
In SCSS, can I make .block__element dependent
of the modifier of its block?
For example, say .header__text
is always white but only when .header
has the modifier .header--bgblue
.
<div class="header">
<div class="header__text">
Default color is black
</div>
</div>
<div class="header header--bgblue">
<div class="header__text">
I want this to be white because it's inside header--bgblue
</div>
</div>
Or is it best practice to make seperate element modifiers for each element?
<div class="header header--blue">
<div class="header__text header__text--white">
I want this to be white because it's inside header--bgblue
</div>
</div>
In this case it's a small effort but when there are more dependencies (e.g. more elements involved), is this the way to go?