Answer the question
In order to leave comments, you need to log in
Nested CSS selectors?
Trying to improve my HTML+CSS code, gradually learning BEM, I wondered how to properly organize descendant selectors?
UPD: the only correct option, apparently:
.block{
&__header{}
&__text{}
}
Answer the question
In order to leave comments, you need to log in
you have now described cases that can be implemented in SCSS. And a record like:
.block{
.block__header{}
.block__text{}
}
.block{}
.block .block__header{}
.block .block__text{}
.block{
&__header{}
&__text{}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question