Answer the question
In order to leave comments, you need to log in
Does BEM require an element to have the block_el class in order to use the block_el_mod(scss) modifier?
Let's say here is the code
<div class="result-box">
<div class="result-box__info">
<span class="result-box__text">Name</span>
<span class="result-box__text">Surname</span>
<span class="result-box__text">Age</span>
</div>
<div class="result-box__description">
<span class="result-box__text_gray">Know: js, sass</span>
</div>
</div>
@mixin textStyle($size: $defaultFontSize, $color: black, $weigth:normal) {
color:$color;
font-size:$size;
font-weight: $weigth;
font-family: serif;
}
.result-box {
overflow: hidden;
display: grid;
&__text {
@include textStyle($weigth: bold)
}
&__text_gray {
@include textStyle($size :1rem, $color: gray);
}
}
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