mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 11:16:35 +00:00
parent
ab41bdb87d
commit
03ccf014d9
@ -1,3 +1,4 @@
|
|||||||
|
import { haFontFamilyBody } from "../../src/resources/theme/typography.globals";
|
||||||
import "./hassio-main";
|
import "./hassio-main";
|
||||||
|
|
||||||
import("../../src/resources/append-ha-style");
|
import("../../src/resources/append-ha-style");
|
||||||
@ -5,7 +6,7 @@ import("../../src/resources/append-ha-style");
|
|||||||
const styleEl = document.createElement("style");
|
const styleEl = document.createElement("style");
|
||||||
styleEl.textContent = `
|
styleEl.textContent = `
|
||||||
body {
|
body {
|
||||||
font-family: Roboto, sans-serif;
|
font-family: ${haFontFamilyBody};
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
@ -60,7 +60,7 @@ export class HaAssistChip extends AssistChip {
|
|||||||
opacity: var(--ha-assist-chip-active-container-opacity);
|
opacity: var(--ha-assist-chip-active-container-opacity);
|
||||||
}
|
}
|
||||||
.label {
|
.label {
|
||||||
font-family: Roboto, sans-serif;
|
font-family: var(--ha-font-family-body);
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
|
@ -928,7 +928,7 @@ export class HaDataTable extends LitElement {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
.mdc-data-table__content {
|
.mdc-data-table__content {
|
||||||
font-family: Roboto, sans-serif;
|
font-family: var(--ha-font-family-body);
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
@ -1048,7 +1048,7 @@ export class HaDataTable extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.mdc-data-table__cell {
|
.mdc-data-table__cell {
|
||||||
font-family: Roboto, sans-serif;
|
font-family: var(--ha-font-family-body);
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
@ -1170,7 +1170,7 @@ export class HaDataTable extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.mdc-data-table__header-cell {
|
.mdc-data-table__header-cell {
|
||||||
font-family: Roboto, sans-serif;
|
font-family: var(--ha-font-family-body);
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
|
@ -385,7 +385,7 @@ export class HaBaseTimeInput extends LitElement {
|
|||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
font-family: var(
|
font-family: var(
|
||||||
--mdc-typography-body2-font-family,
|
--mdc-typography-body2-font-family,
|
||||||
var(--mdc-typography-font-family, Roboto, sans-serif)
|
var(--mdc-typography-font-family, var(--ha-font-family-body))
|
||||||
);
|
);
|
||||||
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);
|
||||||
|
@ -58,7 +58,7 @@ export class HaControlButton extends LitElement {
|
|||||||
padding: var(--control-button-padding);
|
padding: var(--control-button-padding);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
line-height: inherit;
|
line-height: inherit;
|
||||||
font-family: Roboto;
|
font-family: var(--ha-font-family-body);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
outline: none;
|
outline: none;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -37,7 +37,7 @@ export class HaOutlinedTextField extends OutlinedTextField {
|
|||||||
--mdc-icon-size: var(--md-input-chip-icon-size, 18px);
|
--mdc-icon-size: var(--md-input-chip-icon-size, 18px);
|
||||||
}
|
}
|
||||||
.input {
|
.input {
|
||||||
font-family: Roboto, sans-serif;
|
font-family: var(--ha-font-family-body);
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
|
@ -66,7 +66,7 @@ export class HaSettingsRow extends LitElement {
|
|||||||
padding-top: 4px;
|
padding-top: 4px;
|
||||||
font-family: var(
|
font-family: var(
|
||||||
--mdc-typography-body2-font-family,
|
--mdc-typography-body2-font-family,
|
||||||
var(--mdc-typography-font-family, Roboto, sans-serif)
|
var(--mdc-typography-font-family, var(--ha-font-family-body))
|
||||||
);
|
);
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
font-size: var(--mdc-typography-body2-font-size, 0.875rem);
|
font-size: var(--mdc-typography-body2-font-size, 0.875rem);
|
||||||
|
@ -12,7 +12,7 @@ export const configFlowContentStyles = css`
|
|||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
font-family: var(
|
font-family: var(
|
||||||
--mdc-typography-headline6-font-family,
|
--mdc-typography-headline6-font-family,
|
||||||
var(--mdc-typography-font-family, Roboto, sans-serif)
|
var(--mdc-typography-font-family, var(--ha-font-family-body))
|
||||||
);
|
);
|
||||||
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);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, user-scalable=no, viewport-fit=cover, initial-scale=1">
|
<meta name="viewport" content="width=device-width, user-scalable=no, viewport-fit=cover, initial-scale=1">
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
font-family: Roboto, Noto, Noto Sans, sans-serif;
|
font-family: Roboto, Noto, sans-serif;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
@ -526,7 +526,7 @@ class OnboardingLocation extends LitElement {
|
|||||||
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-family: var(
|
font-family: var(
|
||||||
--mdc-typography-caption-font-family,
|
--mdc-typography-caption-font-family,
|
||||||
var(--mdc-typography-font-family, Roboto, sans-serif)
|
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, 400);
|
||||||
|
@ -579,7 +579,7 @@ class DialogBackupOnboarding extends LitElement implements HassDialog {
|
|||||||
.encryption-key p {
|
.encryption-key p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
font-family: "Roboto Mono", "Consolas", "Menlo", monospace;
|
font-family: var(--ha-font-family-code);
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
@ -313,7 +313,7 @@ class DialogChangeBackupEncryptionKey extends LitElement implements HassDialog {
|
|||||||
.encryption-key p {
|
.encryption-key p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
font-family: "Roboto Mono", "Consolas", "Menlo", monospace;
|
font-family: var(--ha-font-family-code);
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
@ -231,7 +231,7 @@ class DialogSetBackupEncryptionKey extends LitElement implements HassDialog {
|
|||||||
.encryption-key p {
|
.encryption-key p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
font-family: "Roboto Mono", "Consolas", "Menlo", monospace;
|
font-family: var(--ha-font-family-code);
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
@ -153,7 +153,7 @@ class DialogShowBackupEncryptionKey extends LitElement implements HassDialog {
|
|||||||
.encryption-key p {
|
.encryption-key p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
font-family: "Roboto Mono", "Consolas", "Menlo", monospace;
|
font-family: var(--ha-font-family-code);
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
@ -256,7 +256,7 @@ class DialogMatterOpenCommissioningWindow extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.code {
|
.code {
|
||||||
font-family: monospace;
|
font-family: var(--ha-font-family-code);
|
||||||
}
|
}
|
||||||
|
|
||||||
.note {
|
.note {
|
||||||
|
@ -80,7 +80,7 @@ export class ZWaveJsAddNodeCodeInput extends LitElement {
|
|||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
div {
|
div {
|
||||||
font-family: "Roboto Mono", "Consolas", "Menlo", monospace;
|
font-family: var(--ha-font-family-code);
|
||||||
margin-top: 16px;
|
margin-top: 16px;
|
||||||
}
|
}
|
||||||
div span {
|
div span {
|
||||||
|
@ -322,7 +322,7 @@ ${type === "object"
|
|||||||
}
|
}
|
||||||
|
|
||||||
.rendered {
|
.rendered {
|
||||||
font-family: "Roboto Mono", "Consolas", "Menlo", monospace;
|
font-family: var(--ha-font-family-code);
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
clear: both;
|
clear: both;
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
|
@ -106,7 +106,7 @@ export const haTheme = EditorView.theme({
|
|||||||
background: "none",
|
background: "none",
|
||||||
color: "var(--primary-color)",
|
color: "var(--primary-color)",
|
||||||
fontFamily:
|
fontFamily:
|
||||||
"var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif))",
|
"var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, var(--ha-font-family-body)))",
|
||||||
fontSize: "var(--mdc-typography-button-font-size, 0.875rem)",
|
fontSize: "var(--mdc-typography-button-font-size, 0.875rem)",
|
||||||
height: "36px",
|
height: "36px",
|
||||||
fontWeight: "var(--mdc-typography-button-font-weight, 500)",
|
fontWeight: "var(--mdc-typography-button-font-weight, 500)",
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
import { css } from "lit";
|
import { css } from "lit";
|
||||||
import { extractDerivedVars } from "../../common/style/derived-css-vars";
|
import {
|
||||||
|
extractDerivedVars,
|
||||||
|
extractVar,
|
||||||
|
} from "../../common/style/derived-css-vars";
|
||||||
|
|
||||||
export const typographyStyles = css`
|
export const typographyStyles = css`
|
||||||
html {
|
html {
|
||||||
@ -38,3 +41,8 @@ export const typographyStyles = css`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
export const typographyDerivedVariables = extractDerivedVars(typographyStyles);
|
export const typographyDerivedVariables = extractDerivedVars(typographyStyles);
|
||||||
|
|
||||||
|
export const haFontFamilyBody = extractVar(
|
||||||
|
typographyStyles,
|
||||||
|
"font-family-body"
|
||||||
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user