How we can apply CSS to a li which contains a particular class on children/sub-children with CSS only. For example, we have
<li>
<div class='custom-class-1'>
Alex
</div>
</li>
<li>
<div class='custom-class-2'>
Alex
</div>
</li>
So in this case, We want to apply a style to li which has a div with class custom-class-2, so in above example style will be applied on second li only.