Checklist
- [ X] I updated the card to the latest version available
- [X ] I cleared the cache of my browser
Describe the bug
When using show_icon: true alone, the icon renders correctly. However, as soon as any styling is added (via styles:, extra_styles, or card_mod), the icon disappears completely regardless of what styles are defined. Even a single harmless style like height: 50px on the card breaks the icon.
Version of the card
Version: v7.0.1
Home Assistant version:
core-2026.5.3
To Reproduce
This is the configuration I used:
Works (icon visible):
type: custom:button-card
entity: light.my_light
icon: mdi:chandelier
show_icon: true
Broken (icon invisible):
type: custom:button-card
entity: light.my_light
icon: mdi:chandelier
show_icon: true
styles:
card:
- height: 50px
Screenshots
N/A
Expected behavior
An icon that is showed and the possibilities to make styling for the button and/or icon with styles: extra_styles and/or card-mod.
Desktop (please complete the following information):
- Browser: Microsoft Edge (also reproduced on Android)
- card-mod version: v4.2.1
- Frosted Glass theme installed (but issue reproduces with default theme too)
-Tested on clean dashboard with no other cards
Smartphone (please complete the following information):
- Device: Android (Samsung)
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Beeing working on builing a nice setup for my lamps with help from Claude, but even Claude was unable to make some styling and a visible icon.
Checklist
Describe the bug
When using show_icon: true alone, the icon renders correctly. However, as soon as any styling is added (via styles:, extra_styles, or card_mod), the icon disappears completely regardless of what styles are defined. Even a single harmless style like height: 50px on the card breaks the icon.
Version of the card
Version: v7.0.1
Home Assistant version:
core-2026.5.3
To Reproduce
This is the configuration I used:
Works (icon visible):
Broken (icon invisible):
Screenshots
N/A
Expected behavior
An icon that is showed and the possibilities to make styling for the button and/or icon with styles: extra_styles and/or card-mod.
Desktop (please complete the following information):
-Tested on clean dashboard with no other cards
Smartphone (please complete the following information):
Additional context
Beeing working on builing a nice setup for my lamps with help from Claude, but even Claude was unable to make some styling and a visible icon.