Using Twig in element CSS

I try to use a Twig expression in the Element CSS. The following does not work:

$el {
  --STcolor: blue;
  {% if {{ looper.index }} == '1' %}
     --STcolor: green;
  {% endif %}
}

In fact, with the Twig statement being part of element CSS, it even ignores the basic declaration, --STcolor: blue;

EDIT:
I found my syntax error. However, it still does not work fully.

  {% if looper.index == '1' %}

or

  {% if looper.index == 1 %}

return ‘green’ for each looped element, and

{% if looper.index > 1 %}

returns blue for each element.