Skip to main content

Interface: CssVarsOptions

Defined in: roots/toCssVars.ts:87

Options for toCssVars().

Properties

colorScheme?

optional colorScheme?: "light" | "dark" | "light dark"

Defined in: roots/toCssVars.ts:106

Sets the color-scheme CSS property in the generated block. Helps native elements (inputs, scrollbars) respect the active mode.


mode?

optional mode?: "light" | "dark"

Defined in: roots/toCssVars.ts:97

Mode for scoping. Adds [data-tt-mode="<mode>"] to the selector. Only effective when themeId is also set.


selector?

optional selector?: string

Defined in: roots/toCssVars.ts:101

Custom CSS selector override. Takes precedence over themeId/mode.


themeId?

optional themeId?: string

Defined in: roots/toCssVars.ts:92

Theme identifier for scoping. Generates [data-tt-theme="<themeId>"] selector. When omitted, uses :root.