Skip to contents

Injects :root { --glass-*: ... } without forking SCSS. Accepts public token names from glass_css_tokens() ("blur"), CSS names ("--glass-blur"), or glass-blur. Unknown names that already start with -- are passed through; others must be in the catalog.

Usage

glass_add_tokens(theme, tokens = list(), ...)

Arguments

theme

A glass_theme() / bslib::bs_theme() object.

tokens

Named list or character vector of CSS values.

...

Additional name = value overrides.

Value

The theme, with an extra HTML dependency.

Examples

th <- glass_theme()
th <- glass_add_tokens(th, list(blur = "28px", radius = "1.25rem"))