Files
hermes-agent/apps
Brooklyn Nicholson dffe2c346e fix(desktop): apply app color scheme to inline previews
The ::preview iframe's theme prelude carried tokens, font, and a
transparent background but no color-scheme, so the frame document fell
back to the UA default color-scheme:light — form controls, scrollbars,
the canvas beneath the transparent body, and prefers-color-scheme
inside the frame ignored the app's dark theme (#95814). A transparent
background alone does not fix this.

Inject :root{color-scheme:<app scheme>} as part of the prelude (first,
so a preview page's own color-scheme declaration still wins) and key
the framedDoc memo on the scheme so a theme switch rebuilds the srcdoc.

Mirrors #97463.

Co-authored-by: 墨綠BG <103036558+BlackishGreen33@users.noreply.github.com>
2026-09-25 00:58:00 -05:00
..