Skip to content

Commit

Permalink
Use same padding to match as vertical/horizontal stack card for title
Browse files Browse the repository at this point in the history
  • Loading branch information
piitaya committed Feb 1, 2024
1 parent 17b61cc commit d5b71f1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/cards/title-card/title-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,17 +300,19 @@ export class TitleCard extends MushroomBaseElement implements LovelaceCard {
transform: translateX(-4px);
}
.title {
color: var(--primary-text-color);
color: var(--title-color);
font-size: var(--title-font-size);
font-weight: var(--title-font-weight);
line-height: var(--title-line-height);
letter-spacing: var(--title-letter-spacing);
--mdc-icon-size: var(--title-font-size);
}
.subtitle {
color: var(--secondary-text-color);
color: var(--subtitle-color);
font-size: var(--subtitle-font-size);
font-weight: var(--subtitle-font-weight);
line-height: var(--subtitle-line-height);
letter-spacing: var(--subtitle-letter-spacing);
--mdc-icon-size: var(--subtitle-font-size);
}
.align-start {
Expand Down
12 changes: 8 additions & 4 deletions src/utils/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@ export const themeVariables = css`
--spacing: var(--mush-spacing, 12px);
/* Title */
--title-padding: var(--mush-title-padding, 24px 12px 16px);
--title-spacing: var(--mush-title-spacing, 12px);
--title-padding: var(--mush-title-padding, 24px 12px 8px);
--title-spacing: var(--mush-title-spacing, 8px);
--title-font-size: var(--mush-title-font-size, 24px);
--title-font-weight: var(--mush-title-font-weight, normal);
--title-line-height: var(--mush-title-line-height, 1.2);
--title-line-height: var(--mush-title-line-height, 32px);
--title-color: var(--mush-title-color, var(--primary-text-color));
--title-letter-spacing: var(--mush-title-letter-spacing, -0.288px);
--subtitle-font-size: var(--mush-subtitle-font-size, 16px);
--subtitle-font-weight: var(--mush-subtitle-font-weight, normal);
--subtitle-line-height: var(--mush-subtitle-line-height, 1.2);
--subtitle-line-height: var(--mush-subtitle-line-height, 24px);
--subtitle-color: var(--mush-subtitle-color, var(--secondary-text-color));
--subtitle-letter-spacing: var(--mush-subtitle-letter-spacing, 0px);
/* Card */
--card-primary-font-size: var(--mush-card-primary-font-size, 14px);
Expand Down

0 comments on commit d5b71f1

Please sign in to comment.