v0.4.2 — Font apply fix + background bleed fix
Fixes in 0.4.2
Font not changing — fixed
Two things were wrong:
-
Tailwind's
--font-sanswasn't being updated. Hermes uses both--theme-font-sans(the theme system variable) and Tailwind v4's--font-sans(used by.font-sansutility classes on components). We were only setting the first one. Now both are set together. -
Typography vars were skipped when falsy. The old code did
if (t.fontSans) setProperty(...)— meaning a blank value left the previous theme's font in place. Now every typography variable is always written unconditionally.
Background from another theme appearing — fixed
applyThemeToDom now mirrors Hermes's internal _PREV_DYNAMIC_VAR_KEYS pattern: every --component-* and --theme-asset-* variable written by the previous theme call is tracked and wiped before the new theme's variables are applied. Previously only --theme-asset-bg was cleared; now all asset slots and all component buckets are handled.
Native switcher / F5 reverting to wrong theme — fixed
handleActivate now writes to window.localStorage["hermes-dashboard-theme"] (same key as Hermes's own setTheme()). This means the native bottom-left theme switcher and F5 reload both see the correct active theme instead of whatever was active when the page first loaded.