Can I use CSS to select a parent of an element without using jQuery or JavaScript (pure CSS).
Here is my code
<nav>
<ul class='page-numbers'>
<li><span class='page-numbers current'>1</span></li>
<li><a class='page-numbers' href=/page/2/'>2</a></li>
<li><a class='page-numbers' href=/page/3/'>3</a></li>
<li><a class="next page-numbers" href="/page/2/">Next Page</a></li>
</ul>
</nav>
Please note that there is a class called current, and in the example above, it is on the first page. This current class will be inserted into any page that is the current page (so if the current page is the second page, the second item in the list will have the current class.
Now using CSS only (without jQuery or JavaScript), how can I select the list element that has a child with the class current?
Please do not suggest changing the HTML because it should be the way it is because this is the requirement.