Can style be applied only if the lower span class exists? Only CSS [duplicate]

تبليغ
سؤال

يرجى شرح بإيجاز لمإذا تشعر أنك ينبغي الإبلاغ عن هذا السؤال.

تبليغ
‎إلغاء

Hello I have this html structure

<span class=”item-price”>
<del>
<span class=”woocommerce-Price-amount amount”>
<span class=”woocommerce-Price-currencySymbol”>S/.</span>144
</span>
</del>
<ins>
<span class=”woocommerce-Price-amount amount”>
<span class=”woocommerce-Price-currencySymbol”>S/.</span>139
</span>
</ins>
<span class=”cityeduclass”>➤ Incluye el envío a Lima</span>
<span class=”product-stock in-stock” tooltip=”En Stock”></span>
</span>

I need to apply to but only if .cityeduclass exists | Only CSS

span.item-price {
background-color: red;
}

Any ideas Thanks?

Edit:
I need something like this
span.item-price:has(span.cityeduclass)

‫أضف إجابة

تصفح
تصفح

مجهول يجيب