Is there a way in CSS to select an element which has a sub-element with given class?
I want to apply a style to a list that has
No. The CSS Cascade does not allow for this kind of selector.
The best solution in this case would be either to modify the DOM with JavaScript or to change up the resultant HTML to add classes to the ul tags.
ul