Answer the question
In order to leave comments, you need to log in
How to change the styles of a nested element with an additional container class (BEM)?
Hi all. Something is broken in my google.
.grid {
&__item {
}
// класс контейнера
&_visible {
// как правильно сделать, не используя конструкцию .grid__item ниже?
&__item { // само собой, это не работает
}
}
}
Answer the question
In order to leave comments, you need to log in
1) &_visible &__item {
2)
https://jsfiddle.net/qegfbxwr/3/
&_visible &{
&__item{
color:#0f0;
}
}
An easier example
var variable = 1;
var prev;
function check(value) {
var f = value == prev;
prev = value;
return f;
}
setInterval(function() {
variable = Math.random() > 0.5 ? 1 : 0;
}, 2500);
setInterval(function() {
console.log(prev, variable, prev == variable)
console.log('check', check(variable))
}, 5000);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question