Mushroom > 3.3.0 & Primary Text Colour

Hi,

Updating Mushroom to anything newer than 3.3.0 causes this code not to change the primary text colour on a mushroom-template-card - the background colour & other mods are applying as expected:


        card_mod:
          style: |
            ha-card {
              border: none;
              border-radius: 30px;        
              height: 50px !important;
              {% if is_state(config.entity, 'heat') %}
                background: rgba(225, 225, 225, 1);
                --primary-text-color: black;
              {%- elif is_state(config.entity, 'off') %}
                background: rgba(150, 150, 150, 0.2);
                --primary-text-color: white;
              {%- else -%}
                background: red;
                --primary-text-color: white;
              {%- endif %}
             }

Any idea why?

changes from 3.4.1 update, try this

card_mod:
          style: |
            ha-card {
              border: none;
              border-radius: 30px;        
              height: 50px !important;
              {% if is_state(config.entity, 'heat') %}
                background: rgba(225, 225, 225, 1);
               --card-primary-color: black;
              {%- elif is_state(config.entity, 'off') %}
                background: rgba(150, 150, 150, 0.2);
                 --card-primary-color: white;
              {%- else -%}
                background: red;
                --card-primary-color: white;
              {%- endif %}