Hi,
My first time posting on the forum, so please excuse me if I do something wrong.
I looked at every single post I could find and tried all sorts of combinations before posting on the forum.
I’ve stacked 5 custom buttons in a horizontal row by using the stack-in-card and the custom button card. Everything is working as expected and showing correctly.
The next step is to try and reduce the Title font size to 18px by using card-mod.
I’ve used card-mod on entity cards without any issues and I was able to reduce the font-size on these cards by using the card-header property.
As soon as I introcuce card-mod to my custom stack in card the custom buttons dissappear.
Image of the working code.

type: custom:stack-in-card
title: Underfloor Heating
mode: horizontal
keep:
margin: true
border_radius: true
cards:
- type: custom:button-card
color_type: card
entity: switch.uh_ensuite
name: Ensuite
show_icon: false
state:
- value: 'on'
color: orange
- operator: default
styles:
card:
- height: 80px
- font-size: 14px
- color: 212121
name:
- white-space: unset
- type: custom:button-card
color_type: card
entity: switch.uh_hoofslaapkamer
name: Main Bedroom
show_icon: false
state:
- value: 'on'
color: orange
- operator: default
styles:
card:
- height: 80px
- font-size: 14px
- color: 212121
name:
- white-space: unset
- type: custom:button-card
color_type: card
entity: switch.uh_spaarkamer
name: Spare Room
show_icon: false
state:
- value: 'on'
color: orange
- operator: default
styles:
card:
- height: 80px
- font-size: 14px
- color: 212121
name:
- white-space: unset
- type: custom:button-card
color_type: card
entity: switch.uh_tv_kamer
name: TV Room
show_icon: false
state:
- value: 'on'
color: orange
- operator: default
styles:
card:
- height: 80px
- font-size: 14px
- color: 212121
name:
- white-space: unset
- type: custom:button-card
color_type: card
entity: switch.uh_zac_kamer
name: Zac Room
show_icon: false
state:
- value: 'on'
color: orange
- operator: default
styles:
card:
- height: 80px
- font-size: 14px
- color: 212121
name:
- white-space: unset
Picture of custom mod-card with properties not working. Now this is probably due to my lack of knowledge, but according to me this should work. I’ve tried so many different options and can’t get this to work. If someone can please point me in the right direction.
(Tried to paste a screenshot but not allowed as a newbie.)
type: custom:mod-card
style:
stack-in-card$: |
.card-header {
font-size: 18px;
}
card:
type: custom:stack-in-card
title: Underfloor Heating
mode: horizontal
keep:
margin: true
border_radius: true
cards:
- type: custom:button-card
color_type: card
entity: switch.uh_ensuite
name: Ensuite
show_icon: false
state:
- value: 'on'
color: orange
- operator: default
styles:
card:
- height: 80px
- font-size: 14px
- color: 212121
name:
- white-space: unset
- type: custom:button-card
color_type: card
entity: switch.uh_hoofslaapkamer
name: Main Bedroom
show_icon: false
state:
- value: 'on'
color: orange
- operator: default
styles:
card:
- height: 80px
- font-size: 14px
- color: 212121
name:
- white-space: unset
- type: custom:button-card
color_type: card
entity: switch.uh_spaarkamer
name: Spare Room
show_icon: false
state:
- value: 'on'
color: orange
- operator: default
styles:
card:
- height: 80px
- font-size: 14px
- color: 212121
name:
- white-space: unset
- type: custom:button-card
color_type: card
entity: switch.uh_tv_kamer
name: TV Room
show_icon: false
state:
- value: 'on'
color: orange
- operator: default
styles:
card:
- height: 80px
- font-size: 14px
- color: 212121
name:
- white-space: unset
- type: custom:button-card
color_type: card
entity: switch.uh_zac_kamer
name: Zac Room
show_icon: false
state:
- value: 'on'
color: orange
- operator: default
styles:
card:
- height: 80px
- font-size: 14px
- color: 212121
name:
- white-space: unset