mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46:42 +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 = (
|
const _extractCssVars = (
|
||||||
cssString: string,
|
cssString: string,
|
||||||
condition: (string) => boolean = () => true
|
condition: (string: string) => boolean = () => true
|
||||||
) => {
|
) => {
|
||||||
const variables: Record<string, string> = {};
|
const variables: Record<string, string> = {};
|
||||||
|
|
||||||
|
@ -299,6 +299,7 @@ export const colorStyles = css`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const darkColorStyles = css`
|
const darkColorStyles = css`
|
||||||
|
html {
|
||||||
--primary-background-color: #111111;
|
--primary-background-color: #111111;
|
||||||
--card-background-color: #1c1c1c;
|
--card-background-color: #1c1c1c;
|
||||||
--secondary-background-color: #282828;
|
--secondary-background-color: #282828;
|
||||||
@ -351,6 +352,7 @@ const darkColorStyles = css`
|
|||||||
--map-filter: invert(0.9) hue-rotate(170deg) brightness(1.5) contrast(1.2)
|
--map-filter: invert(0.9) hue-rotate(170deg) brightness(1.5) contrast(1.2)
|
||||||
saturate(0.3);
|
saturate(0.3);
|
||||||
--disabled-color: #464646;
|
--disabled-color: #464646;
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
export const colorDerivedVariables = extractDerivedVars(colorStyles);
|
export const colorDerivedVariables = extractDerivedVars(colorStyles);
|
||||||
export const darkColorVariables = extractVars(darkColorStyles);
|
export const darkColorVariables = extractVars(darkColorStyles);
|
||||||
|
@ -26,12 +26,6 @@ export const mainStyles = css`
|
|||||||
--float-end: right;
|
--float-end: right;
|
||||||
--margin-title-ltr: 0 0 0 24px;
|
--margin-title-ltr: 0 0 0 24px;
|
||||||
--margin-title-rtl: 0 24px 0 0;
|
--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-font-smoothing: antialiased;
|
||||||
--ha-moz-osx-font-smoothing: grayscale;
|
--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