Skip to main content

var

Macro var 

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

The var! macro for referencing CSS custom properties defined via vars!.

The variable name can be written as an unquoted kebab-case identifier (e.g., bg-primary) or as a quoted string literal (e.g., "bg-primary"), and expands to the CSS string "var(--bg-primary)".

§Arguments

  • TokenStream - The var! { ... } invocation tokens.

§Returns

  • TokenStream - The expanded var(--name) tokens.