(scheme: "light" | "dark", variables?: { name: string; dark?: string | undefined; base?: string | undefined; summary?: string | undefined; }[]): { name: string; dark?: string | undefined; base?: string | undefined; summary?: string | undefined; }[] import {compute_scheme_mirror} from '@fuzdev/fuz_css/theme_stance.js'; Computes the mirror a single-scheme stance implies: every scheme-adaptive
variable in variables (those carrying a dark slot), re-slotted with the
stanced scheme's value in the base slot. A base-slot declaration in
fuz.theme applies in both color schemes - cascade-layer order beats the
higher specificity of the fuz.base dark-scheme defaults (:root.dark and
its prefers-color-scheme twin) - and keeping the mirror out of the dark
slot means later same-block declarations (the theme's own variables,
composed overlays, compiled caps) always win by source order.
The mirror depends on the stance alone, not on the theme: the renderer skips an entry whose name the theme or its caps set.
scheme
the stance to mirror for
variables?
the variable set to mirror, scheme_adaptive_variables by default
StyleVariable[]scheme_adaptive_variablesreturns
the mirrored variables, to render before the theme's own