mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 03:36:44 +00:00
Move vaadin typography vars to typography globals (#25398)
This commit is contained in:
parent
461d5eb687
commit
15ae37d077
@ -2,7 +2,7 @@ import type { CSSResult } from "lit";
|
||||
|
||||
const _extractCssVars = (
|
||||
cssString: string,
|
||||
condition: (string) => boolean = () => true
|
||||
condition: (string: string) => boolean = () => true
|
||||
) => {
|
||||
const variables: Record<string, string> = {};
|
||||
|
||||
|
@ -299,58 +299,60 @@ export const colorStyles = css`
|
||||
`;
|
||||
|
||||
const darkColorStyles = css`
|
||||
--primary-background-color: #111111;
|
||||
--card-background-color: #1c1c1c;
|
||||
--secondary-background-color: #282828;
|
||||
--clear-background-color: #111111;
|
||||
--primary-text-color: #e1e1e1;
|
||||
--secondary-text-color: #9b9b9b;
|
||||
--disabled-text-color: #6f6f6f;
|
||||
--app-header-text-color: #e1e1e1;
|
||||
--app-header-background-color: #101e24;
|
||||
--switch-unchecked-button-color: #999999;
|
||||
--switch-unchecked-track-color: #9b9b9b;
|
||||
--divider-color: rgba(225, 225, 225, 0.12);
|
||||
--outline-color: rgba(225, 225, 225, 0.12);
|
||||
--outline-hover-color: rgba(225, 225, 225, 0.24);
|
||||
--mdc-ripple-color: #aaaaaa;
|
||||
--mdc-linear-progress-buffer-color: rgba(255, 255, 255, 0.1);
|
||||
html {
|
||||
--primary-background-color: #111111;
|
||||
--card-background-color: #1c1c1c;
|
||||
--secondary-background-color: #282828;
|
||||
--clear-background-color: #111111;
|
||||
--primary-text-color: #e1e1e1;
|
||||
--secondary-text-color: #9b9b9b;
|
||||
--disabled-text-color: #6f6f6f;
|
||||
--app-header-text-color: #e1e1e1;
|
||||
--app-header-background-color: #101e24;
|
||||
--switch-unchecked-button-color: #999999;
|
||||
--switch-unchecked-track-color: #9b9b9b;
|
||||
--divider-color: rgba(225, 225, 225, 0.12);
|
||||
--outline-color: rgba(225, 225, 225, 0.12);
|
||||
--outline-hover-color: rgba(225, 225, 225, 0.24);
|
||||
--mdc-ripple-color: #aaaaaa;
|
||||
--mdc-linear-progress-buffer-color: rgba(255, 255, 255, 0.1);
|
||||
|
||||
--input-idle-line-color: rgba(255, 255, 255, 0.42);
|
||||
--input-hover-line-color: rgba(255, 255, 255, 0.87);
|
||||
--input-disabled-line-color: rgba(255, 255, 255, 0.06);
|
||||
--input-outlined-idle-border-color: rgba(255, 255, 255, 0.38);
|
||||
--input-outlined-hover-border-color: rgba(255, 255, 255, 0.87);
|
||||
--input-outlined-disabled-border-color: rgba(255, 255, 255, 0.06);
|
||||
--input-fill-color: rgba(255, 255, 255, 0.05);
|
||||
--input-disabled-fill-color: rgba(255, 255, 255, 0.02);
|
||||
--input-ink-color: rgba(255, 255, 255, 0.87);
|
||||
--input-label-ink-color: rgba(255, 255, 255, 0.6);
|
||||
--input-disabled-ink-color: rgba(255, 255, 255, 0.37);
|
||||
--input-dropdown-icon-color: rgba(255, 255, 255, 0.54);
|
||||
--input-idle-line-color: rgba(255, 255, 255, 0.42);
|
||||
--input-hover-line-color: rgba(255, 255, 255, 0.87);
|
||||
--input-disabled-line-color: rgba(255, 255, 255, 0.06);
|
||||
--input-outlined-idle-border-color: rgba(255, 255, 255, 0.38);
|
||||
--input-outlined-hover-border-color: rgba(255, 255, 255, 0.87);
|
||||
--input-outlined-disabled-border-color: rgba(255, 255, 255, 0.06);
|
||||
--input-fill-color: rgba(255, 255, 255, 0.05);
|
||||
--input-disabled-fill-color: rgba(255, 255, 255, 0.02);
|
||||
--input-ink-color: rgba(255, 255, 255, 0.87);
|
||||
--input-label-ink-color: rgba(255, 255, 255, 0.6);
|
||||
--input-disabled-ink-color: rgba(255, 255, 255, 0.37);
|
||||
--input-dropdown-icon-color: rgba(255, 255, 255, 0.54);
|
||||
|
||||
--codemirror-keyword: #c792ea;
|
||||
--codemirror-operator: #89ddff;
|
||||
--codemirror-variable: #f07178;
|
||||
--codemirror-variable-2: #eeffff;
|
||||
--codemirror-variable-3: #decb6b;
|
||||
--codemirror-builtin: #ffcb6b;
|
||||
--codemirror-atom: #f78c6c;
|
||||
--codemirror-number: #ff5370;
|
||||
--codemirror-def: #82aaff;
|
||||
--codemirror-string: #c3e88d;
|
||||
--codemirror-string-2: #f07178;
|
||||
--codemirror-comment: #545454;
|
||||
--codemirror-tag: #ff5370;
|
||||
--codemirror-meta: #ffcb6b;
|
||||
--codemirror-attribute: #c792ea;
|
||||
--codemirror-property: #c792ea;
|
||||
--codemirror-qualifier: #decb6b;
|
||||
--codemirror-type: #decb6b;
|
||||
--energy-grid-return-color: #a280db;
|
||||
--map-filter: invert(0.9) hue-rotate(170deg) brightness(1.5) contrast(1.2)
|
||||
saturate(0.3);
|
||||
--disabled-color: #464646;
|
||||
--codemirror-keyword: #c792ea;
|
||||
--codemirror-operator: #89ddff;
|
||||
--codemirror-variable: #f07178;
|
||||
--codemirror-variable-2: #eeffff;
|
||||
--codemirror-variable-3: #decb6b;
|
||||
--codemirror-builtin: #ffcb6b;
|
||||
--codemirror-atom: #f78c6c;
|
||||
--codemirror-number: #ff5370;
|
||||
--codemirror-def: #82aaff;
|
||||
--codemirror-string: #c3e88d;
|
||||
--codemirror-string-2: #f07178;
|
||||
--codemirror-comment: #545454;
|
||||
--codemirror-tag: #ff5370;
|
||||
--codemirror-meta: #ffcb6b;
|
||||
--codemirror-attribute: #c792ea;
|
||||
--codemirror-property: #c792ea;
|
||||
--codemirror-qualifier: #decb6b;
|
||||
--codemirror-type: #decb6b;
|
||||
--energy-grid-return-color: #a280db;
|
||||
--map-filter: invert(0.9) hue-rotate(170deg) brightness(1.5) contrast(1.2)
|
||||
saturate(0.3);
|
||||
--disabled-color: #464646;
|
||||
}
|
||||
`;
|
||||
export const colorDerivedVariables = extractDerivedVars(colorStyles);
|
||||
export const darkColorVariables = extractVars(darkColorStyles);
|
||||
|
@ -26,12 +26,6 @@ export const mainStyles = css`
|
||||
--float-end: right;
|
||||
--margin-title-ltr: 0 0 0 24px;
|
||||
--margin-title-rtl: 0 24px 0 0;
|
||||
|
||||
/* Vaadin typography */
|
||||
--material-h6-font-size: var(--ha-font-size-m);
|
||||
--material-small-font-size: var(--ha-font-size-xs);
|
||||
--material-caption-font-size: var(--ha-font-size-2xs);
|
||||
--material-button-font-size: var(--ha-font-size-xs);
|
||||
}
|
||||
`;
|
||||
|
||||
|
@ -44,6 +44,12 @@ export const typographyStyles = css`
|
||||
|
||||
--ha-font-smoothing: antialiased;
|
||||
--ha-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Vaadin typography */
|
||||
--material-h6-font-size: var(--ha-font-size-m);
|
||||
--material-small-font-size: var(--ha-font-size-xs);
|
||||
--material-caption-font-size: var(--ha-font-size-2xs);
|
||||
--material-button-font-size: var(--ha-font-size-xs);
|
||||
}
|
||||
`;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user