theming / Class

RootElementStylePropertiesThemeTokenRegistry

Decorators:@Injectable
Implements:ThemeTokenRegistry

Implementation of ThemeTokenRegistry that defines theme token and values as CSS variables on the root DOM element, usually the <html> element.

Notes

Token names can be optionally prefixed with --, e.g. --primary.

Properties

NameTypeDescription
document
p
Document
element
p
HTMLElement
styles
p
CSSStyleDeclaration | undefined

Methods

get()

No documentation has been provided.

Presentation
get(name: string): string | null;
Parameters
NameTypeDescription
name
string
Returns
string | null

getOrThrow()

Deprecated

prefer get

No documentation has been provided.

Presentation
getOrThrow(name: string): string;
Parameters
NameTypeDescription
name
string
Returns
string
protected

normalizeName()

No documentation has been provided.

Presentation
protected normalizeName(name: string): string;
Parameters
NameTypeDescription
name
string
Returns
string

set()

No documentation has been provided.

Presentation
set(name: string, value: string | null): void;
Parameters
NameTypeDescription
name
string
value
string | null
Returns
void