I have the following scss snippet. When .child
is present I want the .container
to have a color of yellow
I have code elsewhere which removes adds/removes the element with .child
on it
.container {
height: 100%;
color: red;
:global {
.child {
background-color: black;
}
.container .child { <=== This obviously doesn't work but
I need .container to be yellow only when child is present
color: yellow;
}
}
}
How do I represent that in scss?