Answer the question
In order to leave comments, you need to log in
How to use double ampersand in SCSS for BEM?
I used Less before
and if I needed to apply a modifier for a block, I <div class="block block--red"></div>
wrote
.block {
border: 1px solid black;
color: black;
&&--red {
color: red;
}
}
Answer the question
In order to leave comments, you need to log in
1) block block--red is there a cascade in the beam?
2) one &
3) if you had such a class "block_block--red"
.block {
border: 1px solid black;
color: black;
&_block {
border:1px solid green;
&--red{
color:red; //Here are the styles for the required block
}
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question