Skip to content

pantoken-root / formats/css/src / scopedThemeCss

Function: scopedThemeCss() ​

scopedThemeCss(theme, options?): string

Beta

One theme's complete token set, scoped to any element carrying data-pantoken-theme="<theme>" or the equivalent .--pantoken-theme-<theme> class.

Every token is emitted as a declaration — including the concrete ones that would normally become @property initial-values — because an initial-value is document-global and cannot vary per scope.

Parameters ​

theme ​

Theme

options? ​

ScopedCssOptions = {}

Returns ​

string