CSS does not support any parent selectors. You will have to use JQuery to achieve your requirement.
For example you can write the below code to make yours work
In Css give
li.active{ color: "#ff0000";}
In Jquery
$(".active").has(".active").css("color","#000000");
This will make all elements with class active to have text color as red and once that have another element with class active to have text color black