Class ThemeObserver
Index
Constructors
constructor
- new ThemeObserver(): ThemeObserver
Returns ThemeObserver
Accessors
Static
stores
Static
theme
- get theme(): "theme-dark" | "theme-light"
Returns "theme-dark" | "theme-light"
Current core theme.
Static
themeDark
- get themeDark(): boolean
Returns boolean
Is the core theme
dark
.
Static
themeLight
- get themeLight(): boolean
Returns boolean
Is the core theme
light
.
Methods
Static
appClasses
- appClasses(application: SvelteApp, options?: { hasThemed?: boolean }): string
Helper to apply current core theme to a given SvelteApp optional classes.
Parameters
- application: SvelteApp
Svelte application.
Optional
options: { hasThemed?: boolean }Options.
Optional
hasThemed?: booleanVerify that the original application default options contains the
themed
class otherwise do not add the core theme classes.
Returns string
App classes CSS string with current core theme applied.
- application: SvelteApp
Provides reactive observation of the Foundry core theme applied to
document.body
. There are several stores available to receive updates when the theme changes.