I am new in CSS, I need help in setting background colour of parent span based on which colour child span class has.
For example, I want to set blue background of <span class="aciTreeItem"> if its first span child has class background_blue
MY HTML:
<span class="aciTreeItem">
  <span class="aciTreeIcon icon-server-not-connected background_blue"></span>
  <span class="aciTreeText">AWS(Cluster-1)</span>
</span>
My CSS:
span.aciTreeItem:has(.background_blue)
{
    background: blue;
}
But this is not working, Please suggest.
 
    