Skip to content

Work / Imposter / Wiki / Concepts

uniwind-theme-variables

Conceptverified 2026-10-30

UniWind theme variables

Theme variables have exactly one working form, and the two obvious ones fail silently:

  • light-dark() inside @theme compiles to #000000.
  • A media query plus a .dark selector flattens to one resolver per name, so whichever block is written last becomes the only theme.

The form that works is @layer theme → :root → @variant light / @variant dark, and every variable must appear in both blocks. One present in a single block resolves to black in the theme that is missing it.

src/global.css generates both blocks from one key list: light is the default and dark is a remap.