Skip to content

pantoken-root / formats/css/src / scopedThemeCss

函式: scopedThemeCss() ​

scopedThemeCss(theme, options?): string

Beta(測試)

某一主題的完整 token 集,範圍限定於任何帶有 data-pantoken-theme="<theme>" 的元素,或相等的 .--pantoken-theme-<theme> 類別。

每個 token 都會以宣告形式輸出——包含那些通常會變成 @property 初始值的具體值——因為初始值是文件全域的,無法依作用域變化。

參數 ​

theme ​

Theme

options? ​

ScopedCssOptions = {}

回傳 ​

string