Use mdi icons in css?!

is it possible to use mdi icons provided by ha in css passed to a card by card_mod?!

at the moment i’m downloading the svg to be used…

thanks

What do you need it for?
I can name cases like “change an icon for a feature in a Tile card”.

i’m changing the icon of an entity in a glance card using card_mod and :hover… i can’t find infos about mdi icons path to use

Post a short code for a glance card with, let’s say, colored icon on hover for a start.

i’m using this line in my css…

mask: url( '/local/images/mdi/wifi-remove.svg' ) !important;

i need to know if i can use mdi icons without needing to download and put them in /local folder first…

This is not what I asked. Anyway, try using “––card-mod-icon” variable fir a hovered element.

already tried, --card-mod-icon doesn’t work with :hover

to verify, simple code attached to a glance entity

          card_mod:

            style: |

              state-badge:hover {
                background: red !important;
                --card-mod-icon: mdi:wifi-remove;
              }

:host:hover not recognized…

What about the background, is it styled?
Means - make sure that the selector works ok.

yes, background works… but this not the problem… i’m using this (working) code now

                          card_mod:

                            style:

                              .: |

                                state-badge $ ha-state-icon $ ha-icon $: |

                                  ha-svg-icon:hover {

                                    background: red !important;

                                    mask: url( '/local/images/mdi/icontouse.svg' ) !important;

                                    mask-position: center center !important;

                                    mask-repeat: no-repeat !important;

                                  }

i need, if possible, to use icons without needing to download them… in other words, how do i avoid to use /local/images/mdi/icon.svg in favour of mdi:icon?!