I am using card_mod to customize my cards and I had set that when a switch is turned on, it will show a background color and some margin-top (not important). Now I have added that the name should be displayed in full, but I can’t get these two codes together.
card_mod:
style:
mushroom-state-info$: |
span.primary {
white-space: normal !important;
};
card_mod:
style: |
{% if is_state('script.subir_todas_las_persianas','on') %}
ha-card { --ha-card-background: var(--yellow-color) }
{% endif %}
ha-card {
margin-top: -13px
}