i wanted to implement some custom icons to my application which also uses MDI icons already.
The thing is that if i use the custom icons with an alias that i’ve created for it, there will be still an mdi tag in the corresponding class, which leads to breaking the custom icon e.g. not showing up.
So i tried to use it as an default icon font and then it worked fine, but unfortunately then all the MDI icons won’t show up.
My MDI icons are declared like that:
icon="mdi-plus-circle"
but if I look it up in the console there is the class:
class="mdi mdi-plus-circle"
my custom icons are declared like that:
icon="$alias"
but it still uses the mdi tag in the class like mentioned above, which it shouldnt.
Is there any convenient way to handle both cases the best way or am I doing something wrong?
I’ve tried to use the custom iconfont as a default font.
I’ve tried some hacky way which uses a MutationObserver and checks for all mdi tags in classes and removes the ones which shouldnt be included, but that’s not a great solution in my opinion.
Maximilian Haseneder is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.