Use ha-font-weight typography css tokens (#25374)

Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
This commit is contained in:
Wendelin 2025-05-08 17:11:53 +02:00 committed by GitHub
parent 6692d9c6aa
commit ba4ec960c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
158 changed files with 219 additions and 189 deletions

View File

@ -302,7 +302,7 @@ export class HcConnect extends LitElement {
} }
.error { .error {
color: red; color: red;
font-weight: bold; font-weight: var(--ha-font-weight-bold);
} }
.error a { .error a {

View File

@ -113,7 +113,7 @@ class HcLayout extends LitElement {
} }
:host ::slotted(.section-header) { :host ::slotted(.section-header) {
font-weight: 500; font-weight: var(--ha-font-weight-medium);
padding: 4px 16px; padding: 4px 16px;
text-transform: uppercase; text-transform: uppercase;
} }

View File

@ -251,7 +251,7 @@ class HaGallery extends LitElement {
.page-footer .header { .page-footer .header {
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: var(--ha-font-weight-medium);
line-height: 28px; line-height: 28px;
text-align: center; text-align: center;
} }

View File

@ -150,7 +150,7 @@ export class DemoHaBarButton extends LitElement {
margin: 0; margin: 0;
} }
label { label {
font-weight: 600; font-weight: var(--ha-font-weight-bold);
} }
.custom { .custom {
--control-button-icon-color: var(--primary-color); --control-button-icon-color: var(--primary-color);

View File

@ -86,7 +86,7 @@ export class DemoHarControlNumberButtons extends LitElement {
margin: 0; margin: 0;
} }
label { label {
font-weight: 600; font-weight: var(--ha-font-weight-bold);
} }
.custom { .custom {
color: #2196f3; color: #2196f3;

View File

@ -125,7 +125,7 @@ export class DemoHaControlSelectMenu extends LitElement {
margin: 0; margin: 0;
} }
label { label {
font-weight: 600; font-weight: var(--ha-font-weight-bold);
} }
.custom { .custom {
--control-button-icon-color: var(--primary-color); --control-button-icon-color: var(--primary-color);

View File

@ -181,7 +181,7 @@ export class DemoHaControlSelect extends LitElement {
margin: 0; margin: 0;
} }
label { label {
font-weight: 600; font-weight: var(--ha-font-weight-bold);
} }
.custom { .custom {
--mdc-icon-size: 24px; --mdc-icon-size: 24px;

View File

@ -144,7 +144,7 @@ export class DemoHaBarSlider extends LitElement {
margin: 0; margin: 0;
} }
label { label {
font-weight: 600; font-weight: var(--ha-font-weight-bold);
} }
.custom { .custom {
--control-slider-color: #ffcf4c; --control-slider-color: #ffcf4c;

View File

@ -112,7 +112,7 @@ export class DemoHaControlSwitch extends LitElement {
margin: 0; margin: 0;
} }
label { label {
font-weight: 600; font-weight: var(--ha-font-weight-bold);
} }
.custom { .custom {
--control-switch-on-color: var(--green-color); --control-switch-on-color: var(--green-color);

View File

@ -106,7 +106,7 @@ export class DemoHaHsColorPicker extends LitElement {
} }
.value { .value {
font-size: 22px; font-size: 22px;
font-weight: bold; font-weight: var(--ha-font-weight-bold);
margin: 0 0 12px 0; margin: 0 0 12px 0;
} }
`; `;

View File

@ -123,7 +123,7 @@ export class DemoHaSelectBox extends LitElement {
margin: 0; margin: 0;
} }
label { label {
font-weight: 600; font-weight: var(--ha-font-weight-bold);
margin-bottom: 8px; margin-bottom: 8px;
display: block; display: block;
} }

View File

@ -106,7 +106,7 @@ export class DemoDateTimeDateTimeNumeric extends LitElement {
margin: 12px auto; margin: 12px auto;
} }
.header { .header {
font-weight: bold; font-weight: var(--ha-font-weight-bold);
} }
.center { .center {
text-align: center; text-align: center;

View File

@ -106,7 +106,7 @@ export class DemoDateTimeDateTimeSeconds extends LitElement {
margin: 12px auto; margin: 12px auto;
} }
.header { .header {
font-weight: bold; font-weight: var(--ha-font-weight-bold);
} }
.center { .center {
text-align: center; text-align: center;

View File

@ -106,7 +106,7 @@ export class DemoDateTimeDateTimeShortYear extends LitElement {
margin: 12px auto; margin: 12px auto;
} }
.header { .header {
font-weight: bold; font-weight: var(--ha-font-weight-bold);
} }
.center { .center {
text-align: center; text-align: center;

View File

@ -106,7 +106,7 @@ export class DemoDateTimeDateTimeShort extends LitElement {
margin: 12px auto; margin: 12px auto;
} }
.header { .header {
font-weight: bold; font-weight: var(--ha-font-weight-bold);
} }
.center { .center {
text-align: center; text-align: center;

View File

@ -106,7 +106,7 @@ export class DemoDateTimeDateTime extends LitElement {
margin: 12px auto; margin: 12px auto;
} }
.header { .header {
font-weight: bold; font-weight: var(--ha-font-weight-bold);
} }
.center { .center {
text-align: center; text-align: center;

View File

@ -92,7 +92,7 @@ export class DemoDateTimeDate extends LitElement {
static styles = css` static styles = css`
.header { .header {
font-weight: bold; font-weight: var(--ha-font-weight-bold);
} }
.center { .center {
text-align: center; text-align: center;

View File

@ -106,7 +106,7 @@ export class DemoDateTimeTimeSeconds extends LitElement {
margin: 12px auto; margin: 12px auto;
} }
.header { .header {
font-weight: bold; font-weight: var(--ha-font-weight-bold);
} }
.center { .center {
text-align: center; text-align: center;

View File

@ -106,7 +106,7 @@ export class DemoDateTimeTimeWeekday extends LitElement {
margin: 12px auto; margin: 12px auto;
} }
.header { .header {
font-weight: bold; font-weight: var(--ha-font-weight-bold);
} }
.center { .center {
text-align: center; text-align: center;

View File

@ -106,7 +106,7 @@ export class DemoDateTimeTime extends LitElement {
margin: 12px auto; margin: 12px auto;
} }
.header { .header {
font-weight: bold; font-weight: var(--ha-font-weight-bold);
} }
.center { .center {
text-align: center; text-align: center;

View File

@ -434,7 +434,7 @@ class HassioAddonConfig extends LitElement {
padding: 12px 16px 16px; padding: 12px 16px 16px;
display: block; display: block;
margin-block: 0px; margin-block: 0px;
font-weight: normal; font-weight: var(--ha-font-weight-normal);
} }
.card-actions.right { .card-actions.right {
justify-content: flex-end; justify-content: flex-end;

View File

@ -391,7 +391,7 @@ export class HassioBackups extends LitElement {
top: -4px; top: -4px;
} }
.selected-txt { .selected-txt {
font-weight: bold; font-weight: var(--ha-font-weight-bold);
padding-left: 16px; padding-left: 16px;
padding-inline-start: 16px; padding-inline-start: 16px;
padding-inline-end: initial; padding-inline-end: initial;

View File

@ -131,7 +131,7 @@ export class HassioUpdate extends LitElement {
} }
.update-heading { .update-heading {
font-size: var(--ha-font-size-l); font-size: var(--ha-font-size-l);
font-weight: 500; font-weight: var(--ha-font-weight-medium);
margin-bottom: 0.5em; margin-bottom: 0.5em;
color: var(--primary-text-color); color: var(--primary-text-color);
} }

View File

@ -13,7 +13,7 @@ body {
font-family: ${haFontFamilyBody}; font-family: ${haFontFamilyBody};
-moz-osx-font-smoothing: ${haMozOsxFontSmoothing}; -moz-osx-font-smoothing: ${haMozOsxFontSmoothing};
-webkit-font-smoothing: ${haFontSmoothing}; -webkit-font-smoothing: ${haFontSmoothing};
font-weight: 400; font-weight: var(--ha-font-weight-normal);
margin: 0; margin: 0;
padding: 0; padding: 0;
height: 100vh; height: 100vh;

View File

@ -345,7 +345,7 @@ class HassioIngressView extends LitElement {
padding: 0 16px; padding: 0 16px;
pointer-events: none; pointer-events: none;
background-color: var(--app-header-background-color); background-color: var(--app-header-background-color);
font-weight: 400; font-weight: var(--ha-font-weight-normal);
color: var(--app-header-text-color, white); color: var(--app-header-text-color, white);
border-bottom: var(--app-header-border-bottom, none); border-bottom: var(--app-header-border-bottom, none);
box-sizing: border-box; box-sizing: border-box;

View File

@ -152,7 +152,7 @@ export class HaAuthorize extends litLocalizeLiteMixin(LitElement) {
} }
h1 { h1 {
font-size: 28px; font-size: 28px;
font-weight: 400; font-weight: var(--ha-font-weight-normal);
margin-top: 16px; margin-top: 16px;
margin-bottom: 16px; margin-bottom: 16px;
} }

View File

@ -58,7 +58,7 @@ export class HaPickAuthProvider extends LitElement {
z-index: 1; z-index: 1;
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: var(--ha-font-weight-normal);
line-height: 20px; line-height: 20px;
} }
h3:before { h3:before {

View File

@ -933,7 +933,7 @@ export class HaDataTable extends LitElement {
-webkit-font-smoothing: var(--ha-font-smoothing); -webkit-font-smoothing: var(--ha-font-smoothing);
font-size: 0.875rem; font-size: 0.875rem;
line-height: 1.25rem; line-height: 1.25rem;
font-weight: 400; font-weight: var(--ha-font-weight-normal);
letter-spacing: 0.0178571429em; letter-spacing: 0.0178571429em;
text-decoration: inherit; text-decoration: inherit;
text-transform: inherit; text-transform: inherit;
@ -1053,7 +1053,7 @@ export class HaDataTable extends LitElement {
-webkit-font-smoothing: var(--ha-font-smoothing); -webkit-font-smoothing: var(--ha-font-smoothing);
font-size: 0.875rem; font-size: 0.875rem;
line-height: 1.25rem; line-height: 1.25rem;
font-weight: 400; font-weight: var(--ha-font-weight-normal);
letter-spacing: 0.0178571429em; letter-spacing: 0.0178571429em;
text-decoration: inherit; text-decoration: inherit;
text-transform: inherit; text-transform: inherit;
@ -1175,7 +1175,7 @@ export class HaDataTable extends LitElement {
-webkit-font-smoothing: var(--ha-font-smoothing); -webkit-font-smoothing: var(--ha-font-smoothing);
font-size: 0.875rem; font-size: 0.875rem;
line-height: 1.375rem; line-height: 1.375rem;
font-weight: 500; font-weight: var(--ha-font-weight-medium);
letter-spacing: 0.0071428571em; letter-spacing: 0.0071428571em;
text-decoration: inherit; text-decoration: inherit;
text-transform: inherit; text-transform: inherit;
@ -1199,7 +1199,7 @@ export class HaDataTable extends LitElement {
padding-inline-start: 12px; padding-inline-start: 12px;
padding-inline-end: initial; padding-inline-end: initial;
width: 100%; width: 100%;
font-weight: 500; font-weight: var(--ha-font-weight-medium);
display: flex; display: flex;
align-items: center; align-items: center;
cursor: pointer; cursor: pointer;

View File

@ -129,7 +129,7 @@ class HaAlert extends LitElement {
} }
.title { .title {
margin-top: 2px; margin-top: 2px;
font-weight: bold; font-weight: var(--ha-font-weight-bold);
} }
.action mwc-button, .action mwc-button,
.action ha-icon-button { .action ha-icon-button {

View File

@ -56,7 +56,7 @@ export class HaAnsiToHtml extends LitElement {
overflow-wrap: break-word; overflow-wrap: break-word;
} }
.bold { .bold {
font-weight: bold; font-weight: var(--ha-font-weight-bold);
} }
.italic { .italic {
font-style: italic; font-style: italic;

View File

@ -97,7 +97,7 @@ export class HaBadge extends LitElement {
.label { .label {
font-size: 10px; font-size: 10px;
font-style: normal; font-style: normal;
font-weight: 500; font-weight: var(--ha-font-weight-medium);
line-height: 10px; line-height: 10px;
letter-spacing: 0.1px; letter-spacing: 0.1px;
color: var(--secondary-text-color); color: var(--secondary-text-color);
@ -105,7 +105,7 @@ export class HaBadge extends LitElement {
.content { .content {
font-size: var(--ha-badge-font-size, var(--ha-font-size-s)); font-size: var(--ha-badge-font-size, var(--ha-font-size-s));
font-style: normal; font-style: normal;
font-weight: 500; font-weight: var(--ha-font-weight-medium);
line-height: 16px; line-height: 16px;
letter-spacing: 0.1px; letter-spacing: 0.1px;
color: var(--primary-text-color); color: var(--primary-text-color);

View File

@ -389,7 +389,10 @@ export class HaBaseTimeInput extends LitElement {
); );
font-size: var(--mdc-typography-body2-font-size, 0.875rem); font-size: var(--mdc-typography-body2-font-size, 0.875rem);
line-height: var(--mdc-typography-body2-line-height, 1.25rem); line-height: var(--mdc-typography-body2-line-height, 1.25rem);
font-weight: var(--mdc-typography-body2-font-weight, 400); font-weight: var(
--mdc-typography-body2-font-weight,
var(--ha-font-weight-normal)
);
letter-spacing: var( letter-spacing: var(
--mdc-typography-body2-letter-spacing, --mdc-typography-body2-letter-spacing,
0.0178571429em 0.0178571429em

View File

@ -48,7 +48,7 @@ export class HaCard extends LitElement {
display: block; display: block;
margin-block-start: 0px; margin-block-start: 0px;
margin-block-end: 0px; margin-block-end: 0px;
font-weight: normal; font-weight: var(--ha-font-weight-normal);
} }
:host ::slotted(.card-content:not(:first-child)), :host ::slotted(.card-content:not(:first-child)),

View File

@ -154,7 +154,7 @@ class HaClimateState extends LitElement {
} }
.state-label { .state-label {
font-weight: bold; font-weight: var(--ha-font-weight-bold);
} }
.unit { .unit {

View File

@ -59,7 +59,7 @@ export class HaControlButton extends LitElement {
box-sizing: border-box; box-sizing: border-box;
line-height: inherit; line-height: inherit;
font-family: var(--ha-font-family-body); font-family: var(--ha-font-family-body);
font-weight: 500; font-weight: var(--ha-font-weight-medium);
outline: none; outline: none;
overflow: hidden; overflow: hidden;
background: none; background: none;

View File

@ -194,7 +194,7 @@ export class HaControlNumberButton extends LitElement {
color: var(--primary-text-color); color: var(--primary-text-color);
-webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: transparent;
font-style: normal; font-style: normal;
font-weight: 500; font-weight: var(--ha-font-weight-medium);
transition: color 180ms ease-in-out; transition: color 180ms ease-in-out;
} }
:host([disabled]) { :host([disabled]) {

View File

@ -208,7 +208,7 @@ export class HaControlSelectMenu extends SelectBase {
width: 100%; width: 100%;
user-select: none; user-select: none;
font-style: normal; font-style: normal;
font-weight: 400; font-weight: var(--ha-font-weight-normal);
letter-spacing: 0.25px; letter-spacing: 0.25px;
} }
.content { .content {

View File

@ -207,7 +207,7 @@ export class HaControlSelect extends LitElement {
outline: none; outline: none;
transition: box-shadow 180ms ease-in-out; transition: box-shadow 180ms ease-in-out;
font-style: normal; font-style: normal;
font-weight: 500; font-weight: var(--ha-font-weight-medium);
color: var(--primary-text-color); color: var(--primary-text-color);
user-select: none; user-select: none;
-webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: transparent;

View File

@ -55,7 +55,7 @@ export class HaDialogHeader extends LitElement {
.header-title { .header-title {
font-size: 22px; font-size: 22px;
line-height: 28px; line-height: 28px;
font-weight: 400; font-weight: var(--ha-font-weight-normal);
} }
.header-subtitle { .header-subtitle {
font-size: 14px; font-size: 14px;

View File

@ -85,7 +85,7 @@ export class HaDialog extends DialogBase {
var(--dialog-backdrop-filter, none) var(--dialog-backdrop-filter, none)
); );
--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: var(--ha-font-weight-normal);
--mdc-typography-headline6-font-size: 1.574rem; --mdc-typography-headline6-font-size: 1.574rem;
} }
.mdc-dialog__actions { .mdc-dialog__actions {

View File

@ -188,7 +188,7 @@ export class HaExpansionPanel extends LitElement {
align-items: center; align-items: center;
cursor: pointer; cursor: pointer;
overflow: hidden; overflow: hidden;
font-weight: 500; font-weight: var(--ha-font-weight-medium);
outline: none; outline: none;
} }
#summary.noCollapse { #summary.noCollapse {

View File

@ -324,7 +324,7 @@ export class HaFileUpload extends LitElement {
box-sizing: border-box; box-sizing: border-box;
} }
.header { .header {
font-weight: 500; font-weight: var(--ha-font-weight-medium);
} }
.progress { .progress {
color: var(--secondary-text-color); color: var(--secondary-text-color);

View File

@ -208,7 +208,7 @@ export class HaFilterBlueprints extends LitElement {
min-width: 16px; min-width: 16px;
box-sizing: border-box; box-sizing: border-box;
border-radius: 50%; border-radius: 50%;
font-weight: 400; font-weight: var(--ha-font-weight-normal);
font-size: 11px; font-size: 11px;
background-color: var(--primary-color); background-color: var(--primary-color);
line-height: 16px; line-height: 16px;

View File

@ -303,7 +303,7 @@ export class HaFilterCategories extends SubscribeMixin(LitElement) {
min-width: 16px; min-width: 16px;
box-sizing: border-box; box-sizing: border-box;
border-radius: 50%; border-radius: 50%;
font-weight: 400; font-weight: var(--ha-font-weight-normal);
font-size: 11px; font-size: 11px;
background-color: var(--primary-color); background-color: var(--primary-color);
line-height: 16px; line-height: 16px;

View File

@ -232,7 +232,7 @@ export class HaFilterDevices extends LitElement {
min-width: 16px; min-width: 16px;
box-sizing: border-box; box-sizing: border-box;
border-radius: 50%; border-radius: 50%;
font-weight: 400; font-weight: var(--ha-font-weight-normal);
font-size: 11px; font-size: 11px;
background-color: var(--primary-color); background-color: var(--primary-color);
line-height: 16px; line-height: 16px;

View File

@ -189,7 +189,7 @@ export class HaFilterDomains extends LitElement {
min-width: 16px; min-width: 16px;
box-sizing: border-box; box-sizing: border-box;
border-radius: 50%; border-radius: 50%;
font-weight: 400; font-weight: var(--ha-font-weight-normal);
font-size: 11px; font-size: 11px;
background-color: var(--primary-color); background-color: var(--primary-color);
line-height: 16px; line-height: 16px;

View File

@ -246,7 +246,7 @@ export class HaFilterEntities extends LitElement {
min-width: 16px; min-width: 16px;
box-sizing: border-box; box-sizing: border-box;
border-radius: 50%; border-radius: 50%;
font-weight: 400; font-weight: var(--ha-font-weight-normal);
font-size: 11px; font-size: 11px;
background-color: var(--primary-color); background-color: var(--primary-color);
line-height: 16px; line-height: 16px;

View File

@ -303,7 +303,7 @@ export class HaFilterFloorAreas extends LitElement {
min-width: 16px; min-width: 16px;
box-sizing: border-box; box-sizing: border-box;
border-radius: 50%; border-radius: 50%;
font-weight: 400; font-weight: var(--ha-font-weight-normal);
font-size: 11px; font-size: 11px;
background-color: var(--primary-color); background-color: var(--primary-color);
line-height: 16px; line-height: 16px;

View File

@ -195,7 +195,7 @@ export class HaFilterIntegrations extends LitElement {
min-width: 16px; min-width: 16px;
box-sizing: border-box; box-sizing: border-box;
border-radius: 50%; border-radius: 50%;
font-weight: 400; font-weight: var(--ha-font-weight-normal);
font-size: 11px; font-size: 11px;
background-color: var(--primary-color); background-color: var(--primary-color);
line-height: 16px; line-height: 16px;

View File

@ -233,7 +233,7 @@ export class HaFilterLabels extends SubscribeMixin(LitElement) {
min-width: 16px; min-width: 16px;
box-sizing: border-box; box-sizing: border-box;
border-radius: 50%; border-radius: 50%;
font-weight: 400; font-weight: var(--ha-font-weight-normal);
font-size: 11px; font-size: 11px;
background-color: var(--primary-color); background-color: var(--primary-color);
line-height: 16px; line-height: 16px;

View File

@ -177,7 +177,7 @@ export class HaFilterStates extends LitElement {
min-width: 16px; min-width: 16px;
box-sizing: border-box; box-sizing: border-box;
border-radius: 50%; border-radius: 50%;
font-weight: 400; font-weight: var(--ha-font-weight-normal);
font-size: 11px; font-size: 11px;
background-color: var(--primary-color); background-color: var(--primary-color);
line-height: 16px; line-height: 16px;

View File

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

View File

@ -20,7 +20,7 @@ export class HaFormConstant extends LitElement implements HaFormElement {
display: block; display: block;
} }
.label { .label {
font-weight: 500; font-weight: var(--ha-font-weight-medium);
} }
`; `;
} }

View File

@ -103,7 +103,7 @@ class HaHumidifierState extends LitElement {
} }
.state-label { .state-label {
font-weight: bold; font-weight: var(--ha-font-weight-bold);
} }
.unit { .unit {

View File

@ -91,7 +91,7 @@ class HaLabelBadge extends LitElement {
color: var(--ha-label-badge-label-color, white); color: var(--ha-label-badge-label-color, white);
border-radius: 1em; border-radius: 1em;
padding: 9% 16% 8% 16%; /* mostly apitalized text, not much descenders => bit more top margin */ padding: 9% 16% 8% 16%; /* mostly apitalized text, not much descenders => bit more top margin */
font-weight: 500; font-weight: var(--ha-font-weight-medium);
overflow: hidden; overflow: hidden;
text-transform: uppercase; text-transform: uppercase;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -102,7 +102,10 @@ class HaLabelBadge extends LitElement {
margin-top: 1em; margin-top: 1em;
font-size: var(--ha-label-badge-title-font-size, 0.9em); font-size: var(--ha-label-badge-title-font-size, 0.9em);
width: var(--ha-label-badge-title-width, 5em); width: var(--ha-label-badge-title-width, 5em);
font-weight: var(--ha-label-badge-title-font-weight, 400); font-weight: var(
--ha-label-badge-title-font-weight,
var(--ha-font-weight-normal)
);
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
line-height: normal; line-height: normal;

View File

@ -33,7 +33,7 @@ class HaLabel extends LitElement {
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
font-size: 12px; font-size: 12px;
font-weight: 500; font-weight: var(--ha-font-weight-medium);
line-height: 16px; line-height: 16px;
letter-spacing: 0.1px; letter-spacing: 0.1px;
vertical-align: middle; vertical-align: middle;

View File

@ -86,7 +86,7 @@ export class HaMarkdown extends LitElement {
} }
h2 { h2 {
font-size: 1.5em; font-size: 1.5em;
font-weight: bold; font-weight: var(--ha-font-weight-bold);
} }
hr { hr {
border-color: var(--divider-color); border-color: var(--divider-color);

View File

@ -155,7 +155,7 @@ export class HaSelectBox extends LitElement {
.option .content .text .label { .option .content .text .label {
color: var(--primary-text-color); color: var(--primary-text-color);
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: var(--ha-font-weight-normal);
line-height: 20px; line-height: 20px;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
@ -164,7 +164,7 @@ export class HaSelectBox extends LitElement {
.option .content .text .description { .option .content .text .description {
color: var(--secondary-text-color); color: var(--secondary-text-color);
font-size: 13px; font-size: 13px;
font-weight: 400; font-weight: var(--ha-font-weight-normal);
line-height: 16px; line-height: 16px;
} }
img { img {

View File

@ -45,7 +45,7 @@ export class HaActionSelector extends LitElement {
label { label {
display: block; display: block;
margin-bottom: 4px; margin-bottom: 4px;
font-weight: 500; font-weight: var(--ha-font-weight-medium);
} }
`; `;
} }

View File

@ -62,7 +62,10 @@ export class HaBooleanSelector extends LitElement {
box-sizing: border-box; box-sizing: border-box;
color: var(--secondary-text-color); color: var(--secondary-text-color);
font-size: 0.875rem; font-size: 0.875rem;
font-weight: var(--mdc-typography-body2-font-weight, 400); font-weight: var(
--mdc-typography-body2-font-weight,
var(--ha-font-weight-normal)
);
} }
`; `;
} }

View File

@ -36,7 +36,7 @@ export class HaConditionSelector extends LitElement {
label { label {
display: block; display: block;
margin-bottom: 4px; margin-bottom: 4px;
font-weight: 500; font-weight: var(--ha-font-weight-medium);
} }
`; `;
} }

View File

@ -45,7 +45,7 @@ export class HaTriggerSelector extends LitElement {
label { label {
display: block; display: block;
margin-bottom: 4px; margin-bottom: 4px;
font-weight: 500; font-weight: var(--ha-font-weight-medium);
} }
`; `;
} }

View File

@ -71,7 +71,10 @@ export class HaSettingsRow extends LitElement {
-webkit-font-smoothing: var(--ha-font-smoothing); -webkit-font-smoothing: var(--ha-font-smoothing);
-moz-osx-font-smoothing: var(--ha-moz-osx-font-smoothing); -moz-osx-font-smoothing: var(--ha-moz-osx-font-smoothing);
font-size: var(--mdc-typography-body2-font-size, 0.875rem); font-size: var(--mdc-typography-body2-font-size, 0.875rem);
font-weight: var(--mdc-typography-body2-font-weight, 400); font-weight: var(
--mdc-typography-body2-font-weight,
var(--ha-font-weight-normal)
);
line-height: normal; line-height: normal;
color: var(--secondary-text-color); color: var(--secondary-text-color);
} }

View File

@ -829,7 +829,7 @@ class HaSidebar extends SubscribeMixin(LitElement) {
padding: 0 4px; padding: 0 4px;
border-bottom: 1px solid transparent; border-bottom: 1px solid transparent;
white-space: nowrap; white-space: nowrap;
font-weight: 400; font-weight: var(--ha-font-weight-normal);
color: var( color: var(
--sidebar-menu-button-text-color, --sidebar-menu-button-text-color,
var(--primary-text-color) var(--primary-text-color)
@ -941,7 +941,7 @@ class HaSidebar extends SubscribeMixin(LitElement) {
ha-md-list-item .item-text { ha-md-list-item .item-text {
font-family: var(--ha-font-family-body); font-family: var(--ha-font-family-body);
display: none; display: none;
font-weight: 500; font-weight: var(--ha-font-weight-medium);
font-size: 14px; font-size: 14px;
} }
:host([expanded]) ha-md-list-item .item-text { :host([expanded]) ha-md-list-item .item-text {
@ -964,7 +964,7 @@ class HaSidebar extends SubscribeMixin(LitElement) {
align-items: center; align-items: center;
min-width: 8px; min-width: 8px;
border-radius: 10px; border-radius: 10px;
font-weight: 400; font-weight: var(--ha-font-weight-normal);
line-height: normal; line-height: normal;
background-color: var(--accent-color); background-color: var(--accent-color);
padding: 2px 6px; padding: 2px 6px;
@ -998,7 +998,7 @@ class HaSidebar extends SubscribeMixin(LitElement) {
.subheader { .subheader {
color: var(--sidebar-text-color); color: var(--sidebar-text-color);
font-weight: 500; font-weight: var(--ha-font-weight-medium);
font-size: 14px; font-size: 14px;
padding: 16px; padding: 16px;
white-space: nowrap; white-space: nowrap;
@ -1013,7 +1013,7 @@ class HaSidebar extends SubscribeMixin(LitElement) {
color: var(--sidebar-background-color); color: var(--sidebar-background-color);
background-color: var(--sidebar-text-color); background-color: var(--sidebar-text-color);
padding: 4px; padding: 4px;
font-weight: 500; font-weight: var(--ha-font-weight-medium);
} }
.menu ha-icon-button { .menu ha-icon-button {

View File

@ -38,7 +38,7 @@ class HaTip extends LitElement {
} }
.prefix { .prefix {
font-weight: 500; font-weight: var(--ha-font-weight-medium);
} }
`; `;
} }

View File

@ -16,7 +16,7 @@ export class HaTopAppBarFixed extends TopAppBarFixedBase {
padding-top: var(--header-height); padding-top: var(--header-height);
} }
.mdc-top-app-bar { .mdc-top-app-bar {
--mdc-typography-headline6-font-weight: 400; --mdc-typography-headline6-font-weight: var(--ha-font-weight-normal);
color: var(--app-header-text-color, var(--mdc-theme-on-primary, #fff)); color: var(--app-header-text-color, var(--mdc-theme-on-primary, #fff));
background-color: var( background-color: var(
--app-header-background-color, --app-header-background-color,

View File

@ -16,7 +16,7 @@ export class HaTopAppBar extends TopAppBarBase {
padding-top: var(--header-height); padding-top: var(--header-height);
} }
.mdc-top-app-bar { .mdc-top-app-bar {
--mdc-typography-headline6-font-weight: 400; --mdc-typography-headline6-font-weight: var(--ha-font-weight-normal);
color: var(--app-header-text-color, var(--mdc-theme-on-primary, #fff)); color: var(--app-header-text-color, var(--mdc-theme-on-primary, #fff));
background-color: var( background-color: var(
--app-header-background-color, --app-header-background-color,

View File

@ -268,7 +268,7 @@ export class TopAppBarBaseBase extends BaseElement {
); );
} }
.mdc-top-app-bar { .mdc-top-app-bar {
--mdc-typography-headline6-font-weight: 400; --mdc-typography-headline6-font-weight: var(--ha-font-weight-normal);
color: var(--app-header-text-color, var(--mdc-theme-on-primary, #fff)); color: var(--app-header-text-color, var(--mdc-theme-on-primary, #fff));
background-color: var( background-color: var(
--app-header-background-color, --app-header-background-color,

View File

@ -71,7 +71,7 @@ export class HaWaterHeaterState extends LitElement {
} }
.state-label { .state-label {
font-weight: bold; font-weight: var(--ha-font-weight-bold);
} }
.label { .label {

View File

@ -967,7 +967,7 @@ export class HaMediaPlayerBrowse extends LitElement {
.breadcrumb .title { .breadcrumb .title {
font-size: 32px; font-size: 32px;
line-height: 1.2; line-height: 1.2;
font-weight: bold; font-weight: var(--ha-font-weight-bold);
margin: 0; margin: 0;
overflow: hidden; overflow: hidden;
display: -webkit-box; display: -webkit-box;

View File

@ -34,14 +34,14 @@ export class HaTileInfo extends LitElement {
width: 100%; width: 100%;
} }
.primary { .primary {
font-weight: 500; font-weight: var(--ha-font-weight-medium);
font-size: 14px; font-size: 14px;
line-height: 20px; line-height: 20px;
letter-spacing: 0.1px; letter-spacing: 0.1px;
color: var(--primary-text-color); color: var(--primary-text-color);
} }
.secondary { .secondary {
font-weight: 400; font-weight: var(--ha-font-weight-normal);
font-size: 12px; font-size: 12px;
line-height: 16px; line-height: 16px;
letter-spacing: 0.4px; letter-spacing: 0.4px;

View File

@ -16,7 +16,10 @@ export const configFlowContentStyles = css`
); );
font-size: var(--mdc-typography-headline6-font-size, 1.25rem); font-size: var(--mdc-typography-headline6-font-size, 1.25rem);
line-height: var(--mdc-typography-headline6-line-height, 2rem); line-height: var(--mdc-typography-headline6-line-height, 2rem);
font-weight: var(--mdc-typography-headline6-font-weight, 500); font-weight: var(
--mdc-typography-headline6-font-weight,
var(--ha-font-weight-medium)
);
letter-spacing: var(--mdc-typography-headline6-letter-spacing, 0.0125em); letter-spacing: var(--mdc-typography-headline6-letter-spacing, 0.0125em);
text-decoration: var(--mdc-typography-headline6-text-decoration, inherit); text-decoration: var(--mdc-typography-headline6-text-decoration, inherit);
text-transform: var(--mdc-typography-headline6-text-transform, inherit); text-transform: var(--mdc-typography-headline6-text-transform, inherit);

View File

@ -74,13 +74,13 @@ export class HaMoreInfoStateHeader extends LitElement {
} }
.state { .state {
font-style: normal; font-style: normal;
font-weight: 400; font-weight: var(--ha-font-weight-normal);
font-size: 36px; font-size: 36px;
line-height: 44px; line-height: 44px;
} }
.last-changed { .last-changed {
font-style: normal; font-style: normal;
font-weight: 500; font-weight: var(--ha-font-weight-medium);
font-size: 16px; font-size: 16px;
line-height: 24px; line-height: 24px;
letter-spacing: 0.1px; letter-spacing: 0.1px;

View File

@ -538,7 +538,7 @@ class MoreInfoClimate extends LitElement {
.current .value { .current .value {
font-size: 22px; font-size: 22px;
font-weight: 500; font-weight: var(--ha-font-weight-medium);
line-height: 28px; line-height: 28px;
direction: ltr; direction: ltr;
} }

View File

@ -240,7 +240,7 @@ class MoreInfoHumidifier extends LitElement {
} }
.current .value { .current .value {
font-size: 22px; font-size: 22px;
font-weight: 500; font-weight: var(--ha-font-weight-medium);
line-height: 28px; line-height: 28px;
direction: ltr; direction: ltr;
} }

View File

@ -182,7 +182,7 @@ class MoreInfoLock extends LitElement {
align-items: center; align-items: center;
flex-direction: row; flex-direction: row;
gap: 8px; gap: 8px;
font-weight: 500; font-weight: var(--ha-font-weight-medium);
color: var(--success-color); color: var(--success-color);
} }
ha-control-button-group.jammed { ha-control-button-group.jammed {

View File

@ -226,7 +226,7 @@ class MoreInfoScript extends LitElement {
margin-bottom: 16px; margin-bottom: 16px;
} }
.fields .title { .fields .title {
font-weight: bold; font-weight: var(--ha-font-weight-bold);
} }
ha-control-button ha-svg-icon { ha-control-button ha-svg-icon {
z-index: -1; z-index: -1;

View File

@ -242,7 +242,7 @@ class MoreInfoWaterHeater extends LitElement {
.current .value { .current .value {
font-size: 22px; font-size: 22px;
font-weight: 500; font-weight: var(--ha-font-weight-medium);
line-height: 28px; line-height: 28px;
direction: ltr; direction: ltr;
} }

View File

@ -467,7 +467,7 @@ class DialogRestart extends LitElement {
background-color: var(--divider-color); background-color: var(--divider-color);
} }
.section { .section {
font-weight: 500; font-weight: var(--ha-font-weight-medium);
font-size: 14px; font-size: 14px;
line-height: 20px; line-height: 20px;
margin: 8px 0 4px 0; margin: 8px 0 4px 0;

View File

@ -160,14 +160,14 @@ export class CloudStepIntro extends LitElement {
background-color: #cceffe; background-color: #cceffe;
} }
.feature h2 { .feature h2 {
font-weight: 500; font-weight: var(--ha-font-weight-medium);
font-size: 16px; font-size: 16px;
line-height: 24px; line-height: 24px;
margin-top: 0; margin-top: 0;
margin-bottom: 8px; margin-bottom: 8px;
} }
.feature p { .feature p {
font-weight: 400; font-weight: var(--ha-font-weight-normal);
font-size: 14px; font-size: 14px;
line-height: 20px; line-height: 20px;
margin: 0; margin: 0;

View File

@ -267,7 +267,7 @@ export class HaVoiceCommandDialog extends LitElement {
--mdc-theme-primary: var(--secondary-text-color); --mdc-theme-primary: var(--secondary-text-color);
--mdc-typography-button-text-transform: none; --mdc-typography-button-text-transform: none;
--mdc-typography-button-font-size: unset; --mdc-typography-button-font-size: unset;
--mdc-typography-button-font-weight: 400; --mdc-typography-button-font-weight: var(--ha-font-weight-normal);
--mdc-typography-button-letter-spacing: var( --mdc-typography-button-letter-spacing: var(
--mdc-typography-headline6-letter-spacing, --mdc-typography-headline6-letter-spacing,
0.0125em 0.0125em

View File

@ -69,7 +69,7 @@ class HassErrorScreen extends LitElement {
padding: 8px 12px; padding: 8px 12px;
pointer-events: none; pointer-events: none;
background-color: var(--app-header-background-color); background-color: var(--app-header-background-color);
font-weight: 400; font-weight: var(--ha-font-weight-normal);
color: var(--app-header-text-color, white); color: var(--app-header-text-color, white);
border-bottom: var(--app-header-border-bottom, none); border-bottom: var(--app-header-border-bottom, none);
box-sizing: border-box; box-sizing: border-box;

View File

@ -69,7 +69,7 @@ class HassLoadingScreen extends LitElement {
padding: 8px 12px; padding: 8px 12px;
pointer-events: none; pointer-events: none;
background-color: var(--app-header-background-color); background-color: var(--app-header-background-color);
font-weight: 400; font-weight: var(--ha-font-weight-normal);
color: var(--app-header-text-color, white); color: var(--app-header-text-color, white);
border-bottom: var(--app-header-border-bottom, none); border-bottom: var(--app-header-border-bottom, none);
box-sizing: border-box; box-sizing: border-box;

View File

@ -101,7 +101,7 @@ class HassSubpage extends LitElement {
height: var(--header-height); height: var(--header-height);
padding: 8px 12px; padding: 8px 12px;
background-color: var(--app-header-background-color); background-color: var(--app-header-background-color);
font-weight: 400; font-weight: var(--ha-font-weight-normal);
color: var(--app-header-text-color, white); color: var(--app-header-text-color, white);
border-bottom: var(--app-header-border-bottom, none); border-bottom: var(--app-header-border-bottom, none);
box-sizing: border-box; box-sizing: border-box;

View File

@ -789,7 +789,7 @@ export class HaTabsSubpageDataTable extends KeyboardShortcutMixin(LitElement) {
min-width: 20px; min-width: 20px;
box-sizing: border-box; box-sizing: border-box;
border-radius: 50%; border-radius: 50%;
font-weight: 400; font-weight: var(--ha-font-weight-normal);
background-color: var(--primary-color); background-color: var(--primary-color);
line-height: 20px; line-height: 20px;
text-align: center; text-align: center;
@ -822,7 +822,7 @@ export class HaTabsSubpageDataTable extends KeyboardShortcutMixin(LitElement) {
min-width: 16px; min-width: 16px;
box-sizing: border-box; box-sizing: border-box;
border-radius: 50%; border-radius: 50%;
font-weight: 400; font-weight: var(--ha-font-weight-normal);
font-size: 11px; font-size: 11px;
background-color: var(--primary-color); background-color: var(--primary-color);
line-height: 16px; line-height: 16px;

View File

@ -233,7 +233,7 @@ class HassTabsSubpage extends LitElement {
font-size: 20px; font-size: 20px;
height: var(--header-height); height: var(--header-height);
background-color: var(--sidebar-background-color); background-color: var(--sidebar-background-color);
font-weight: 400; font-weight: var(--ha-font-weight-normal);
border-bottom: 1px solid var(--divider-color); border-bottom: 1px solid var(--divider-color);
box-sizing: border-box; box-sizing: border-box;
} }

View File

@ -529,7 +529,10 @@ class OnboardingLocation extends LitElement {
var(--mdc-typography-font-family, var(--ha-font-family-body)) var(--mdc-typography-font-family, var(--ha-font-family-body))
); );
font-size: var(--mdc-typography-caption-font-size, 0.75rem); font-size: var(--mdc-typography-caption-font-size, 0.75rem);
font-weight: var(--mdc-typography-caption-font-weight, 400); font-weight: var(
--mdc-typography-caption-font-weight,
var(--ha-font-weight-normal)
);
letter-spacing: var( letter-spacing: var(
--mdc-typography-caption-letter-spacing, --mdc-typography-caption-letter-spacing,
0.0333333333em 0.0333333333em

View File

@ -42,7 +42,7 @@ class OnboardingWelcomeLink extends LitElement {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
text-align: center; text-align: center;
font-weight: 500; font-weight: var(--ha-font-weight-medium);
padding: 32px 16px; padding: 32px 16px;
height: 100%; height: 100%;
} }

View File

@ -342,7 +342,7 @@ class OnboardingRestoreBackupRestore extends LitElement {
margin-top: 24px; margin-top: 24px;
margin-bottom: 8px; margin-bottom: 8px;
font-style: normal; font-style: normal;
font-weight: 400; font-weight: var(--ha-font-weight-normal);
} }
.supervisor-warning { .supervisor-warning {
display: block; display: block;

View File

@ -5,7 +5,7 @@ export const onBoardingStyles = css`
padding: 32px; padding: 32px;
} }
h1 { h1 {
font-weight: 400; font-weight: var(--ha-font-weight-normal);
font-size: 28px; font-size: 28px;
line-height: 36px; line-height: 36px;
margin-bottom: 8px; margin-bottom: 8px;

View File

@ -624,7 +624,7 @@ class DialogCalendarEventEditor extends LitElement {
} }
.label { .label {
font-size: 12px; font-size: 12px;
font-weight: 500; font-weight: var(--ha-font-weight-medium);
color: var(--input-label-ink-color); color: var(--input-label-ink-color);
} }
.date-range-details-content { .date-range-details-content {

View File

@ -564,7 +564,7 @@ export class HAFullCalendar extends LitElement {
background-color: var(--table-header-background-color); background-color: var(--table-header-background-color);
color: var(--primary-text-color); color: var(--primary-text-color);
font-size: 11px; font-size: 11px;
font-weight: bold; font-weight: var(--ha-font-weight-bold);
text-transform: uppercase; text-transform: uppercase;
} }
@ -658,11 +658,11 @@ export class HAFullCalendar extends LitElement {
.fc-list-day-text { .fc-list-day-text {
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: var(--ha-font-weight-normal);
} }
.fc-list-day-side-text { .fc-list-day-side-text {
font-weight: 400; font-weight: var(--ha-font-weight-normal);
font-size: 16px; font-size: 16px;
color: var(--primary-color); color: var(--primary-color);
} }

View File

@ -311,7 +311,7 @@ class PanelCalendar extends LitElement {
); );
--mdc-typography-button-font-weight: var( --mdc-typography-button-font-weight: var(
--mdc-typography-headline6-font-weight, --mdc-typography-headline6-font-weight,
500 var(--ha-font-weight-medium)
); );
--mdc-typography-button-letter-spacing: var( --mdc-typography-button-letter-spacing: var(
--mdc-typography-headline6-letter-spacing, --mdc-typography-headline6-letter-spacing,

View File

@ -330,7 +330,7 @@ export class HaConfigApplicationCredentials extends LitElement {
top: -4px; top: -4px;
} }
.selected-txt { .selected-txt {
font-weight: bold; font-weight: var(--ha-font-weight-bold);
padding-left: 16px; padding-left: 16px;
padding-inline-start: 16px; padding-inline-start: 16px;
direction: var(--direction); direction: var(--direction);

View File

@ -655,7 +655,7 @@ class HaConfigAreaPage extends LitElement {
h3 { h3 {
margin: 0; margin: 0;
padding: 0 16px; padding: 0 16px;
font-weight: 500; font-weight: var(--ha-font-weight-medium);
color: var(--secondary-text-color); color: var(--secondary-text-color);
} }
img { img {

View File

@ -456,7 +456,7 @@ export class HaConfigAreasDashboard extends LitElement {
} }
.header h2 { .header h2 {
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: var(--ha-font-weight-medium);
margin-top: 28px; margin-top: 28px;
} }
.header ha-icon { .header ha-icon {

View File

@ -554,7 +554,7 @@ export default class HaAutomationConditionRow extends LitElement {
right: 0px; right: 0px;
left: 0px; left: 0px;
text-transform: uppercase; text-transform: uppercase;
font-weight: bold; font-weight: var(--ha-font-weight-bold);
font-size: 14px; font-size: 14px;
background-color: var(--divider-color, #e0e0e0); background-color: var(--divider-color, #e0e0e0);
color: var(--text-primary-color); color: var(--text-primary-color);

View File

@ -532,7 +532,7 @@ export class HaAutomationTrace extends LitElement {
height: var(--header-height); height: var(--header-height);
padding: 4px; padding: 4px;
background-color: var(--primary-background-color); background-color: var(--primary-background-color);
font-weight: 400; font-weight: var(--ha-font-weight-normal);
color: var(--app-header-text-color, white); color: var(--app-header-text-color, white);
border-bottom: var(--app-header-border-bottom, none); border-bottom: var(--app-header-border-bottom, none);
box-sizing: border-box; box-sizing: border-box;

View File

@ -540,7 +540,7 @@ export class HaManualAutomationEditor extends LitElement {
margin-top: -16px; margin-top: -16px;
} }
.header .name { .header .name {
font-weight: 400; font-weight: var(--ha-font-weight-normal);
flex: 1; flex: 1;
margin-bottom: 16px; margin-bottom: 16px;
} }
@ -549,7 +549,7 @@ export class HaManualAutomationEditor extends LitElement {
} }
.header .small { .header .small {
font-size: small; font-size: small;
font-weight: normal; font-weight: var(--ha-font-weight-normal);
line-height: 0; line-height: 0;
} }
`, `,

View File

@ -700,7 +700,7 @@ export default class HaAutomationTriggerRow extends LitElement {
right: 0px; right: 0px;
left: 0px; left: 0px;
text-transform: uppercase; text-transform: uppercase;
font-weight: bold; font-weight: var(--ha-font-weight-bold);
font-size: 14px; font-size: 14px;
background-color: var(--primary-color); background-color: var(--primary-color);
color: var(--text-primary-color); color: var(--text-primary-color);

Some files were not shown because too many files have changed in this diff Show More