Skip to main content

vars

Macro vars 

Source
vars!() { /* proc-macro */ }
Expand description

The vars! macro for defining CSS custom properties.

Each variable block creates a Css function that, when called, injects the CSS custom properties into the DOM. Variable names are automatically prefixed with --.

Variable names can be written as unquoted kebab-case identifiers (e.g., bg-primary) or as quoted string literals (e.g., "bg-primary").