Fix font settings for button card (#25607)

pull/25610/head
Wendelin 2025-05-27 12:55:20 +02:00 committed by GitHub
parent 52ad31601c
commit b226e5c697
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 5 deletions

View File

@ -224,19 +224,19 @@ export class HuiButtonCard extends LitElement implements LovelaceCard {
filter: colored ? stateColorBrightness(stateObj) : undefined,
height: this._config.icon_height
? this._config.icon_height
: "",
: undefined,
})}
></ha-state-icon>
`
: ""}
: nothing}
${this._config.show_name
? html`<span tabindex="-1" .title=${name}>${name}</span>`
: ""}
: nothing}
${this._config.show_state && stateObj
? html`<span class="state">
${this.hass.formatEntityState(stateObj)}
</span>`
: ""}
: nothing}
</ha-card>
`;
}
@ -282,7 +282,8 @@ export class HuiButtonCard extends LitElement implements LovelaceCard {
align-items: center;
text-align: center;
padding: 4% 0;
font-size: 16.8px;
font-size: var(--ha-font-size-l);
line-height: var(--ha-line-height-condensed);
height: 100%;
box-sizing: border-box;
justify-content: center;