Answer the question
In order to leave comments, you need to log in
Overriding styles in BEM mixes?
How to use mixes in BEM?
For example, I have a block with a logo, which is in both the header and the footer. In the footer, its margin differs from the margin that is set by default for the logo block. How is this supposed to work if my footer styles are higher than my logo styles?
<header class="header">
<div class="logo">
<img class="logo__img" src="path..." alt="logo" width="50" height="25">
</div>
</header>
<footer class="footer">
<div class="logo footer__logo">
<img class="logo__img" src="path..." alt="logo" width="50" height="25">
</div>
</footer>
.footer {
&__logo {
margin: 20px;
}
}
.logo {
margin: 10px;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question