Update rem to use vars

This commit is contained in:
Wendelin 2025-04-28 16:40:09 +02:00
parent 4750a59719
commit 514b6568e5
No known key found for this signature in database
16 changed files with 23 additions and 23 deletions

View File

@ -428,7 +428,7 @@ class HassioAddonConfig extends LitElement {
.header h2 { .header h2 {
color: var(--ha-card-header-color, var(--primary-text-color)); color: var(--ha-card-header-color, var(--primary-text-color));
font-family: var(--ha-card-header-font-family, inherit); font-family: var(--ha-card-header-font-family, inherit);
font-size: var(--ha-card-header-font-size, 24px); font-size: var(--ha-card-header-font-size, var(--ha-font-size-2xl));
letter-spacing: -0.012em; letter-spacing: -0.012em;
line-height: 48px; line-height: 48px;
padding: 12px 16px 16px; padding: 12px 16px 16px;

View File

@ -101,7 +101,7 @@ export class HaAuthFlow extends LitElement {
a.forgot-password { a.forgot-password {
color: var(--primary-color); color: var(--primary-color);
text-decoration: none; text-decoration: none;
font-size: 0.875rem; font-size: var(--ha-font-size-s);
} }
.space-between { .space-between {
display: flex; display: flex;

View File

@ -931,7 +931,7 @@ export class HaDataTable extends LitElement {
font-family: Roboto, sans-serif; font-family: Roboto, sans-serif;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
font-size: 0.875rem; font-size: var(--ha-font-size-s);
line-height: 1.25rem; line-height: 1.25rem;
font-weight: 400; font-weight: 400;
letter-spacing: 0.0178571429em; letter-spacing: 0.0178571429em;
@ -1051,7 +1051,7 @@ export class HaDataTable extends LitElement {
font-family: Roboto, sans-serif; font-family: Roboto, sans-serif;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
font-size: 0.875rem; font-size: var(--ha-font-size-s);
line-height: 1.25rem; line-height: 1.25rem;
font-weight: 400; font-weight: 400;
letter-spacing: 0.0178571429em; letter-spacing: 0.0178571429em;
@ -1173,7 +1173,7 @@ export class HaDataTable extends LitElement {
font-family: Roboto, sans-serif; font-family: Roboto, sans-serif;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
font-size: 0.875rem; font-size: var(--ha-font-size-s);
line-height: 1.375rem; line-height: 1.375rem;
font-weight: 500; font-weight: 500;
letter-spacing: 0.0071428571em; letter-spacing: 0.0071428571em;

View File

@ -86,7 +86,7 @@ export class HaDialog extends DialogBase {
); );
--mdc-dialog-box-shadow: var(--dialog-box-shadow, none); --mdc-dialog-box-shadow: var(--dialog-box-shadow, none);
--mdc-typography-headline6-font-weight: 400; --mdc-typography-headline6-font-weight: 400;
--mdc-typography-headline6-font-size: 1.574rem; --mdc-typography-headline6-font-size: var(--ha-font-size-xl);
} }
.mdc-dialog__actions { .mdc-dialog__actions {
justify-content: var(--justify-action-buttons, flex-end); justify-content: var(--justify-action-buttons, flex-end);

View File

@ -70,7 +70,7 @@ export class HaFormBoolean extends LitElement implements HaFormElement {
padding-top: 4px; padding-top: 4px;
box-sizing: border-box; box-sizing: border-box;
color: var(--secondary-text-color); color: var(--secondary-text-color);
font-size: 0.875rem; font-size: var(--ha-font-size-s);
font-weight: var(--mdc-typography-body2-font-weight, 400); font-weight: var(--mdc-typography-body2-font-weight, 400);
} }
`; `;

View File

@ -12,7 +12,7 @@ class InputHelperText extends LitElement {
:host { :host {
display: block; display: block;
color: var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6)); color: var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6));
font-size: 0.75rem; font-size: var(--ha-font-size-xs);
padding-left: 16px; padding-left: 16px;
padding-right: 16px; padding-right: 16px;
padding-inline-start: 16px; padding-inline-start: 16px;

View File

@ -61,7 +61,7 @@ export class HaBooleanSelector extends LitElement {
padding-top: 4px; padding-top: 4px;
box-sizing: border-box; box-sizing: border-box;
color: var(--secondary-text-color); color: var(--secondary-text-color);
font-size: 0.875rem; font-size: var(--ha-font-size-s);
font-weight: var(--mdc-typography-body2-font-weight, 400); font-weight: var(--mdc-typography-body2-font-weight, 400);
} }
`; `;

View File

@ -64,7 +64,7 @@ class OnboardingRestoreBackupNoCloudBackup extends LitElement {
text-align: left; text-align: left;
} }
.description { .description {
font-size: 1rem; font-size: var(--ha-font-size-m);
line-height: 1.5rem; line-height: 1.5rem;
margin-top: 24px; margin-top: 24px;
margin-bottom: 32px; margin-bottom: 32px;

View File

@ -307,7 +307,7 @@ class OnboardingRestoreBackupRestore extends LitElement {
text-align: left; text-align: left;
} }
.description { .description {
font-size: 1rem; font-size: var(--ha-font-size-m);
line-height: 1.5rem; line-height: 1.5rem;
margin-top: 24px; margin-top: 24px;
margin-bottom: 16px; margin-bottom: 16px;

View File

@ -15,7 +15,7 @@ export const onBoardingStyles = css`
display: block; display: block;
} }
p { p {
font-size: 1rem; font-size: var(--ha-font-size-m);
line-height: 1.5rem; line-height: 1.5rem;
margin-top: 0; margin-top: 0;
margin-bottom: 32px; margin-bottom: 32px;

View File

@ -912,11 +912,11 @@ class ZWaveJSConfigDashboard extends SubscribeMixin(LitElement) {
height: 48px; height: 48px;
} }
.network-status div.heading .details { .network-status div.heading .details {
font-size: 1.5rem; font-size: var(--ha-font-size-xl);
} }
.network-status small { .network-status small {
font-size: 1rem; font-size: var(--ha-font-size-m);
} }
ha-list-item { ha-list-item {

View File

@ -206,7 +206,7 @@ class DialogExposeEntity extends LitElement {
} }
.subtitle { .subtitle {
color: var(--secondary-text-color); color: var(--secondary-text-color);
font-size: 1rem; font-size: var(--ha-font-size-m);
line-height: normal; line-height: normal;
} }
lit-virtualizer { lit-virtualizer {

View File

@ -324,7 +324,7 @@ export class HuiButtonCard extends LitElement implements LovelaceCard {
} }
.state { .state {
font-size: 0.9rem; font-size: var(--ha-font-size-s);
color: var(--secondary-text-color); color: var(--secondary-text-color);
} }
`, `,

View File

@ -231,22 +231,22 @@ export class HuiClockCard extends LitElement implements LovelaceCard {
"hour minute second" "hour minute second"
"hour minute am-pm"; "hour minute am-pm";
font-size: 2rem; font-size: var(--ha-font-size-3xl);
font-weight: 500; font-weight: 500;
line-height: 0.8; line-height: 0.8;
direction: ltr; direction: ltr;
} }
.time-title + .time-parts { .time-title + .time-parts {
font-size: 1.5rem; font-size: var(--ha-font-size-xl);
} }
.time-wrapper.size-medium .time-parts { .time-wrapper.size-medium .time-parts {
font-size: 3rem; font-size: var(--ha-font-size-5xl);
} }
.time-wrapper.size-large .time-parts { .time-wrapper.size-large .time-parts {
font-size: 4rem; font-size: 56px;
} }
.time-wrapper.size-medium .time-parts .time-part.second, .time-wrapper.size-medium .time-parts .time-part.second,

View File

@ -174,7 +174,7 @@ export class HuiHeadingCard extends LitElement implements LovelaceCard {
align-items: center; align-items: center;
gap: 8px; gap: 8px;
color: var(--ha-heading-card-title-color, var(--primary-text-color)); color: var(--ha-heading-card-title-color, var(--primary-text-color));
font-size: var(--ha-heading-card-title-font-size, 16px); font-size: var(--ha-heading-card-title-font-size, var(--ha-font-size-l));
font-weight: var(--ha-heading-card-title-font-weight, 400); font-weight: var(--ha-heading-card-title-font-weight, 400);
line-height: var(--ha-heading-card-title-line-height, 24px); line-height: var(--ha-heading-card-title-line-height, 24px);
letter-spacing: 0.1px; letter-spacing: 0.1px;

View File

@ -254,8 +254,8 @@ export class HuiLightCard extends LitElement implements LovelaceCard {
position: relative; position: relative;
overflow: hidden; overflow: hidden;
text-align: center; text-align: center;
--name-font-size: 1.2rem; --name-font-size: var(--ha-font-size-l);
--brightness-font-size: 1.2rem; --brightness-font-size: var(--ha-font-size-l);
} }
.more-info { .more-info {