TS CSSVars - API Reference • Docs
TS CSSVars - API Reference / CssVarContext
Interface: CssVarContext<T>
The css variables context created from a string containig the raw variable definitions.
Type Parameters
• T extends string
Properties
cssvar()
cssvar: <
K
>(varname
) => `var(–${K})`
Type Parameters
• K extends string
Parameters
• varname: K
the css variable name
Returns
`var(–${K})`
a css var(..) function of a var
Defined in
definitions
definitions:
T
The css variables as a raw definition string.
Defined in
overwrite()
overwrite: <
K
,V
>(varname
,value
) => `–${K}: ${V};`
Type Parameters
• K extends string
• V extends string
| number
Parameters
• varname: K
the css variable name
• value: V
the new value to assign to the css variable
Returns
`–${K}: ${V};`
a raw string of the css variable definition of the overwrite