I need to add a specific style for the parent element, but only if this element has a child with the exact name. For example:
<div class="parent-element">
----! <div class="child-element-1></div> !----
----! or !----
----! <div class="child-element-2></div> !----
</div>
Parent element can have one of this child elements. I searching for something like this:
.parent-element {
parent: &;
.child-element-1 {
parent {
overflow: scroll;
}
}
}
it means, if parent has a child 1, style it like this, if child two: style it another way.