Mixins / foldkit-mixins/theme
scoped
function · packages/mixins/src/theme/root.ts:49
function scoped<T extends ThemeTokens>(
_theme: T,
selector: string,
overrides: Overrides<T>,
): StyleValueToken overrides under selector: a named theme the Model selects with a
root attribute (:root[data-theme="ocean"]), a scheme the user chose
(:root[data-color-scheme="dark"]), or a subtree (.marketing). Which
one is active is the Model's fact; this only says what it means.
theme is the theme being overridden and is read only for its type, so a
group or token it lacks is a type error rather than a variable nothing reads.