From 335b876fec5d1d94a1787812e9fe704f785da8dd Mon Sep 17 00:00:00 2001 From: Wendelin Date: Mon, 28 Apr 2025 16:58:11 +0200 Subject: [PATCH] Update more font sizes --- src/components/ha-base-time-input.ts | 2 +- src/components/ha-settings-row.ts | 2 +- src/dialogs/config-flow/styles.ts | 2 +- src/onboarding/onboarding-location.ts | 5 ++++- src/panels/config/integrations/dialog-add-integration.ts | 5 ++++- .../assist-pipeline-detail/assist-pipeline-detail-config.ts | 2 +- .../assist-pipeline-detail-conversation.ts | 2 +- .../assist-pipeline-detail/assist-pipeline-detail-stt.ts | 2 +- .../assist-pipeline-detail/assist-pipeline-detail-tts.ts | 2 +- .../assist-pipeline-detail-wakeword.ts | 2 +- src/panels/lovelace/cards/hui-alarm-panel-card.ts | 5 ++++- src/resources/codemirror.ts | 2 +- 12 files changed, 21 insertions(+), 12 deletions(-) diff --git a/src/components/ha-base-time-input.ts b/src/components/ha-base-time-input.ts index 7d92b45a50..499cc0d51d 100644 --- a/src/components/ha-base-time-input.ts +++ b/src/components/ha-base-time-input.ts @@ -387,7 +387,7 @@ export class HaBaseTimeInput extends LitElement { --mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif) ); - font-size: var(--mdc-typography-body2-font-size, 0.875rem); + font-size: var(--mdc-typography-body2-font-size, var(--ha-font-size-s)); line-height: var(--mdc-typography-body2-line-height, 1.25rem); font-weight: var( --mdc-typography-body2-font-weight, diff --git a/src/components/ha-settings-row.ts b/src/components/ha-settings-row.ts index ac9f555449..273f23eec0 100644 --- a/src/components/ha-settings-row.ts +++ b/src/components/ha-settings-row.ts @@ -69,7 +69,7 @@ export class HaSettingsRow extends LitElement { var(--mdc-typography-font-family, Roboto, sans-serif) ); -webkit-font-smoothing: antialiased; - font-size: var(--mdc-typography-body2-font-size, 0.875rem); + font-size: var(--mdc-typography-body2-font-size, var(--ha-font-size-s)); font-weight: var( --mdc-typography-body2-font-weight, var(--ha-font-weight-normal) diff --git a/src/dialogs/config-flow/styles.ts b/src/dialogs/config-flow/styles.ts index e9e01dc409..0be98e0deb 100644 --- a/src/dialogs/config-flow/styles.ts +++ b/src/dialogs/config-flow/styles.ts @@ -14,7 +14,7 @@ export const configFlowContentStyles = css` --mdc-typography-headline6-font-family, var(--mdc-typography-font-family, Roboto, sans-serif) ); - font-size: var(--mdc-typography-headline6-font-size, 1.25rem); + font-size: var(--mdc-typography-headline6-font-size, var(--ha-font-size-l)); line-height: var(--mdc-typography-headline6-line-height, 2rem); font-weight: var( --mdc-typography-headline6-font-weight, diff --git a/src/onboarding/onboarding-location.ts b/src/onboarding/onboarding-location.ts index cf0dc4bade..3909ffe82d 100644 --- a/src/onboarding/onboarding-location.ts +++ b/src/onboarding/onboarding-location.ts @@ -528,7 +528,10 @@ class OnboardingLocation extends LitElement { --mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif) ); - font-size: var(--mdc-typography-caption-font-size, 0.75rem); + font-size: var( + --mdc-typography-caption-font-size, + var(--ha-font-size-xs) + ); font-weight: var( --mdc-typography-caption-font-weight, var(--ha-font-weight-normal) diff --git a/src/panels/config/integrations/dialog-add-integration.ts b/src/panels/config/integrations/dialog-add-integration.ts index 400744d5d9..f5f2415e7b 100644 --- a/src/panels/config/integrations/dialog-add-integration.ts +++ b/src/panels/config/integrations/dialog-add-integration.ts @@ -771,7 +771,10 @@ class AddIntegrationDialog extends LitElement { margin-inline-end: initial; padding: 24px 24px 0 24px; color: var(--mdc-dialog-heading-ink-color, rgba(0, 0, 0, 0.87)); - font-size: var(--mdc-typography-headline6-font-size, 1.25rem); + font-size: var( + --mdc-typography-headline6-font-size, + var(--ha-font-size-l) + ); line-height: var(--mdc-typography-headline6-line-height, 2rem); font-weight: var( --mdc-typography-headline6-font-weight, diff --git a/src/panels/config/voice-assistants/assist-pipeline-detail/assist-pipeline-detail-config.ts b/src/panels/config/voice-assistants/assist-pipeline-detail/assist-pipeline-detail-config.ts index ecac46bd7a..90f422be9b 100644 --- a/src/panels/config/voice-assistants/assist-pipeline-detail/assist-pipeline-detail-config.ts +++ b/src/panels/config/voice-assistants/assist-pipeline-detail/assist-pipeline-detail-config.ts @@ -102,7 +102,7 @@ export class AssistPipelineDetailConfig extends LitElement { } p { color: var(--secondary-text-color); - font-size: var(--mdc-typography-body2-font-size, 0.875rem); + font-size: var(--mdc-typography-body2-font-size, var(--ha-font-size-s)); margin-top: 0; margin-bottom: 0; } diff --git a/src/panels/config/voice-assistants/assist-pipeline-detail/assist-pipeline-detail-conversation.ts b/src/panels/config/voice-assistants/assist-pipeline-detail/assist-pipeline-detail-conversation.ts index d915df9442..fe1957f157 100644 --- a/src/panels/config/voice-assistants/assist-pipeline-detail/assist-pipeline-detail-conversation.ts +++ b/src/panels/config/voice-assistants/assist-pipeline-detail/assist-pipeline-detail-conversation.ts @@ -139,7 +139,7 @@ export class AssistPipelineDetailConversation extends LitElement { } p { color: var(--secondary-text-color); - font-size: var(--mdc-typography-body2-font-size, 0.875rem); + font-size: var(--mdc-typography-body2-font-size, var(--ha-font-size-s)); margin-top: 0; margin-bottom: 0; } diff --git a/src/panels/config/voice-assistants/assist-pipeline-detail/assist-pipeline-detail-stt.ts b/src/panels/config/voice-assistants/assist-pipeline-detail/assist-pipeline-detail-stt.ts index 25d27a0fcd..8774e27c32 100644 --- a/src/panels/config/voice-assistants/assist-pipeline-detail/assist-pipeline-detail-stt.ts +++ b/src/panels/config/voice-assistants/assist-pipeline-detail/assist-pipeline-detail-stt.ts @@ -99,7 +99,7 @@ export class AssistPipelineDetailSTT extends LitElement { } p { color: var(--secondary-text-color); - font-size: var(--mdc-typography-body2-font-size, 0.875rem); + font-size: var(--mdc-typography-body2-font-size, var(--ha-font-size-s)); margin-top: 0; margin-bottom: 0; } diff --git a/src/panels/config/voice-assistants/assist-pipeline-detail/assist-pipeline-detail-tts.ts b/src/panels/config/voice-assistants/assist-pipeline-detail/assist-pipeline-detail-tts.ts index bcf76e121f..b58e620f08 100644 --- a/src/panels/config/voice-assistants/assist-pipeline-detail/assist-pipeline-detail-tts.ts +++ b/src/panels/config/voice-assistants/assist-pipeline-detail/assist-pipeline-detail-tts.ts @@ -146,7 +146,7 @@ export class AssistPipelineDetailTTS extends LitElement { } p { color: var(--secondary-text-color); - font-size: var(--mdc-typography-body2-font-size, 0.875rem); + font-size: var(--mdc-typography-body2-font-size, var(--ha-font-size-s)); margin-top: 0; margin-bottom: 0; } diff --git a/src/panels/config/voice-assistants/assist-pipeline-detail/assist-pipeline-detail-wakeword.ts b/src/panels/config/voice-assistants/assist-pipeline-detail/assist-pipeline-detail-wakeword.ts index bd786c9f95..0fd4d7a9d1 100644 --- a/src/panels/config/voice-assistants/assist-pipeline-detail/assist-pipeline-detail-wakeword.ts +++ b/src/panels/config/voice-assistants/assist-pipeline-detail/assist-pipeline-detail-wakeword.ts @@ -153,7 +153,7 @@ export class AssistPipelineDetailWakeWord extends LitElement { } p { color: var(--secondary-text-color); - font-size: var(--mdc-typography-body2-font-size, 0.875rem); + font-size: var(--mdc-typography-body2-font-size, var(--ha-font-size-s)); margin-top: 0; margin-bottom: 0; } diff --git a/src/panels/lovelace/cards/hui-alarm-panel-card.ts b/src/panels/lovelace/cards/hui-alarm-panel-card.ts index 9eebb8a0ce..01b980aebc 100644 --- a/src/panels/lovelace/cards/hui-alarm-panel-card.ts +++ b/src/panels/lovelace/cards/hui-alarm-panel-card.ts @@ -440,7 +440,10 @@ class HuiAlarmPanelCard extends LitElement implements LovelaceCard { } mwc-button.numberkey { - --mdc-typography-button-font-size: var(--keypad-font-size, 0.875rem); + --mdc-typography-button-font-size: var( + --keypad-font-size, + var(--ha-font-size-s) + ); } `; } diff --git a/src/resources/codemirror.ts b/src/resources/codemirror.ts index 7963f74969..1277d7fda3 100644 --- a/src/resources/codemirror.ts +++ b/src/resources/codemirror.ts @@ -107,7 +107,7 @@ export const haTheme = EditorView.theme({ color: "var(--primary-color)", fontFamily: "var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif))", - fontSize: "var(--mdc-typography-button-font-size, 0.875rem)", + fontSize: "var(--mdc-typography-button-font-size, var(--ha-font-size-s))", height: "36px", fontWeight: "var(--mdc-typography-button-font-weight, var(--ha-font-weight-semibold))",