Let's say I have to define a header block in BEM. Headers need some indentation (padding, margins), but it's also a common understanding that layout should stay separated from components.
The question is, should I specify indentation as a part of my header block CSS, or should it only be provided by surrounding blocks (layout blocks or grid)? Both approaches have their cons and pros.
You can mix few blocks (or block and element of some other block) on the same DOM-node.
E.g. <div class="header layout__header">
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With