Also itās a matter of not using 2 separate icon libraries, as other elements of the dashboard are using those icons and theyād be different. Itās quite confusing as well. AFAIK thereās mdi (Material Design Icons, the ones we can use everywhere in HA) but itās not the same as these Material Icons that we can use in card-mod.
Thanks, but that way is too rough. Rather not do it. Bg was just an idea, but I refuse to believe thereās no way to use the standard mdi icons in any way. :S
You are right. I was looking at the google font library instead. Whoopps.
I do in general agree with also trying to remove yourself from google as much as possible, but unfortunately they kinda have a strangle hold on fonts and icons in web development for some reasonā¦
Like i said if you have the svg values of the mdi you want it looks like its possible to set as a background image, example:
You can refuse as much as you want
but the reason it wont be possible (at least without getting into overlapping multiple cards) is because the icon is usually a div on its own.
We cant create new divs with card mod, only pseudo elements. So no way to set an mdi on to it.
Itās a compromise. Using your suggestion, instead of using the svg code, which is long and clutters the yaml, I rather use the CSS version. Much cleaner imo, and also easier to copy/paste and change icons just typing.
Also had to play with the color CSS since I didnāt want the main badge state to control the colour of the secondary badge, so you canāt use --main-color and cannot use āyaml blueā either.
Hereās the result. Secondary badge with same behaviour for a diff entity.
The studio badge is the default one with mdi icon.
Only thing left bothering me is that slight vertical padding difference. Will try to adjust it now.
Edit: solved using line-height:0
I know, everyone is aware, and so was I and Iām using card_mod: for a very long time.
But so long that some of my cards were still using the style: tag alone and I learned it the hard way when upgrading to 3.4.0.
So, as a reminder for whoever is like me and donāt pay attention to release notes:
Itās not only the bignumber-card, I have 3 dashboards and 5-6 different (custom) cards and none of them works with the decluttering card like before the 3.4.0 update. Does anybody have a good example for decluttering card and card mod? Or does anybody know how to fix this?
Ive just updated to 3.4.1 this morning and the breaking changes said that style:...
was being depricated and that
card-mod:
style:
was taking its place.
I have about 200k lines of lovelace to go through to fix, a significant proportion of which uses card-mod and some cards just use the style: attribute natively within their own card (such as custom:button-card and custom:simple-thermostat)
How can I easily āin bulkā determine where card-mod is being used (so I can update it) vs stuff I can ignore?
BTW: I upgraded with the full knowledge of the breaking changes