ok so this might be a bit of a challenge, if at all possible
I like my card headers to show like
or
and with some conditional colors:
Ive configured a card_mod
theme class
with:
ha-card.class-header-margin .card-header {
background: var(--background-color-off);
font-weight: 400;
font-size: 20px;
color: var(--text-color-off);
padding: 0px 12px;
margin: 0px 0px 16px 0px;
}
I found my way to do this with apexcharts-card
, using:
card_mod:
style: |
.wrapper div#header {
background: var(--background-color-off);
padding: 12px;
}
.wrapper div#header div#header__title {
font-weight: 400;
font-size: 20px;
color: var(--text-color-off);
}
a local mod in a card can be like
style:
$: |
.card-header {
background: var(--background-color-off);
font-weight: 400 !important;
font-size: 20px !important;
color: var(--text-color-off) !important;
padding: 0px 12px !important;
margin: 0px 0px 16px 0px !important;
}
.: |
.card-header ha-icon-button {
--card-mod-icon-color: var(--primary-color);
{{'display: none' if is_state('input_boolean.hide_history_graph_link','on')}};
}
the apexchart mod works fine with a simple header without states:
however, when states are shown, like here:
my mod has this effect:
the issue is obvious: the states are in the header and are inside the margins/paddingsā¦
would there be an obvious way to exclude those?
the only other way I could fix this would be to not show the header in the apex, and add it inside a stack/entities with a custom:button-cardā¦
eg
type: custom:mod-card
card_mod: !include /config/dashboard/card_mods/stack_card_gap.yaml
card:
type: vertical-stack
cards:
- type: heading
card_mod:
class: class-section-heading
heading: Energie verbruik
heading_style: title
tap_action:
action: navigate
navigation_path: /ui-data/energie
- type: custom:apexcharts-card
Functional, though awfully convoluted as you can see, so, for this challenge, Iād like to try the mod on the apex charts-card itself, and keep the card config to just the apexcharts with a mod
please have a look?