UNPKG

theme-vir

Version:
35 lines (34 loc) 1.33 kB
import { type ColorThemeOverride } from './color-theme-init.js'; import { type ColorTheme } from './color-theme.js'; /** * Create the `<style>` id used to apply color themes globally by * {@link applyColorThemeViaStyleElement}. * * @category Internal */ export declare function createGlobalThemeStyleId(colorTheme: Readonly<ColorTheme>): string; /** * Sets all of a color theme's CSS vars in a global style element. If no override is given, the * theme color default values are assigned. * * Uses `applyCssVarsViaStyleElement` from `lit-css-vars`. * * @category Color Theme */ export declare function applyColorThemeViaStyleElement(colorTheme: ColorTheme, themeOverride?: ColorThemeOverride | undefined, /** * The context to apply the color theme to. * * @default document.head */ context?: Element | undefined): HTMLStyleElement; /** * A very inefficient way of setting all of a color theme's CSS vars on a given element. If no * override is given, the theme color default values are assigned. * * @deprecated Use {@link applyColorThemeViaStyleElement} instead whenever possible. * @category Internal */ export declare function applyColorTheme( /** This should usually be the top-level `html` element. */ element: HTMLElement, fullTheme: ColorTheme, themeOverride?: ColorThemeOverride | undefined): void;