I have a list similar to:
<ul class="products">
<li class="product-category">
<li class="product-category">
<li class="product">
<li class="product">
</ul>
If there is at least one li.product-category
in the list, I need a selector to target ul::after
. In other words I want to select ul::after
when preceeded by a li.product-category
.
My failed attempts:
li.product-category ~ ul::after {}
li.product-category ~ ::after {}
ul > li.product-category ~ ::after {}
ul > li.product-category ~ :scope::after {}