How to use CSS classes in a custom card?


I’m creating a custom card using the HA documentation here :

Then I try to apply on div / span custom classes which are defined in a custom CSS file imported via the Locelace Board.

I checked that CSS file is loaded, it is.

Example :
<span class="blink">${stateSensorStr}</span>


.blink {
  background: red;

Does someone had this issue ?