CSS variable in Liquid with class tag

Hi to everyone.

I have this code for my left stock product in my custom page product with pagefly


  
{% comment %} Inventory tracking on product page {% endcomment %}

{% if product.variants.first.inventory_management == "shopify" %}

{% if product.variants.first.inventory_quantity <=4 %}										   
Fai presto! Ultimi {{ product.variants.first.inventory_quantity }} pezzi disponibili.

																	 									
{% elsif product.variants.first.inventory_quantity > 4 %}
{{ product.variants.first.inventory_quantity }} pezzi disponibili.
 
{% endif %}
{% else %}
Questo prodotto è disponibile.
{% endif %}

And in CSS style i have this code:

.super2 {
	color: #FF98AD;
	font-size: 16px;
	animation: blinker 2s linear infinite;
}
@keyframes blinker {
	50% {
	opacity: 0;
}
}

How could I customize the font color with the css and the class tag if the products are greater than 4?

Ciao Vincenzo,

ti do un’idea, aggiungi una classe specifica soltanto se il numero dei prodotti è superiori e poi nel CSS puoi usare quella class per fare l’override dello stile della sezione.


    {% comment %} Inventory tracking on product page {% endcomment %}

    

        {% if product.variants.first.inventory_management == "shopify" %}

        {% if product.variants.first.inventory_quantity <=4 %}
        Fai presto! Ultimi {{ product.variants.first.inventory_quantity }} pezzi disponibili.

        {% elsif product.variants.first.inventory_quantity > 4 %}
        {{ product.variants.first.inventory_quantity }} pezzi disponibili.

        {% endif %}
        {% else %}
        Questo prodotto è disponibile.
        {% endif %}