Style icons inside custom:hui-markdown-card

Hello… I´m trying to style some icons inside a custom:hui-markdown-card element… but not work…
I´m trying using this:

  • <ha-icon style="color: red " icon="mdi:alert" ></ha-icon> ---- not work.
  • <span style ="color: red"><ha-icon icon="mdi:alert" ></ha-icon></span> ----- not work.
  • <span class ="clase1"><ha-icon icon="mdi:alert" ></ha-icon></span> and add clase1 to style (card-mod) — not work

adding ha-icon { color: red; } to style (card-mod) work… But I need to change diferent colors to multiples icons and using this method all the icons are red (in this case).

any idea??? thanks…

This works:

<font color="red"> <ha-icon icon="mdi:lightbulb"></ha-icon></font>

1 Like

thanks… work great