From 54dcc286dc3092b4f3255c1927cce3a6877bb05f Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Tue, 17 May 2022 23:34:45 +0200 Subject: [PATCH] feat(theme): add card text line height variable (#496) --- src/shared/state-info.ts | 2 ++ src/utils/theme.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/shared/state-info.ts b/src/shared/state-info.ts index 973a0a2eb..92bd2ea85 100644 --- a/src/shared/state-info.ts +++ b/src/shared/state-info.ts @@ -34,6 +34,7 @@ export class StateItem extends LitElement { .primary { font-weight: var(--card-primary-font-weight); font-size: var(--card-primary-font-size); + line-height: var(--card-primary-line-height); color: var(--primary-text-color); text-overflow: ellipsis; overflow: hidden; @@ -42,6 +43,7 @@ export class StateItem extends LitElement { .secondary { font-weight: var(--card-secondary-font-weight); font-size: var(--card-secondary-font-size); + line-height: var(--card-secondary-line-height); color: var(--secondary-text-color); text-overflow: ellipsis; overflow: hidden; diff --git a/src/utils/theme.ts b/src/utils/theme.ts index 5bb0de97d..defb25d6a 100644 --- a/src/utils/theme.ts +++ b/src/utils/theme.ts @@ -18,6 +18,8 @@ export const themeVariables = css` --card-secondary-font-size: var(--mush-card-secondary-font-size, 12px); --card-primary-font-weight: var(--mush-card-primary-font-weight, bold); --card-secondary-font-weight: var(--mush-card-secondary-font-weight, bolder); + --card-primary-line-height: var(--mush-card-primary-line-height, 1.5); + --card-secondary-line-height: var(--mush-card-secondary-line-height, 1.5); /* Chips */ --chip-spacing: var(--mush-chip-spacing, 8px);