Answer the question
In order to leave comments, you need to log in
How to write styles according to the BEM methodology?
Good day.
I asked myself a question ... Often a situation arises when, when hovering over 1 block, it is necessary for a block nested in it to have a hover effect, for example .
Are there better solutions than what I do? I'm talking about the piece of code:
&__info {
width: 300px;
padding: 30px;
background: #eee;
&:not(:first-child) {
margin-left: 15px;
}
&:hover {
cursor: pointer;
.block__btn {
cursor: pointer;
background: #0D76FF;
}
}
}
.block__info:hover .block__btn {
...
}
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