The door's inline style is light-only (pre is #eee on #111 text), so on a dark phone it is a white flash; it should follow prefers-color-scheme as the forge's own pages do.
Done:
[ ] The door's STYLE declares color-scheme: light dark and a dark @media (prefers-color-scheme: dark) rule for body, links and pre; the CSP's style hash is still computed from STYLE, so the page stays script-free and styled
[ ] A new test asserts the served page's CSP style-src hash matches the sha256 of its one <style> block, and that the dark rule is present
Files: src/apps/door.ts, test/door-scheme.test.ts
Risks: a hand-written hash would break the style silently; keep it derived from STYLE.
Before pushing: bun x tsc --noEmit and bun test test/door-scheme.test.ts test/apps-door.test.ts.
The door's inline style is light-only (
preis #eee on #111 text), so on a dark phone it is a white flash; it should followprefers-color-schemeas the forge's own pages do.Done:
color-scheme: light darkand a dark@media (prefers-color-scheme: dark)rule for body, links andpre; the CSP's style hash is still computed from STYLE, so the page stays script-free and styledstyle-srchash matches the sha256 of its one <style> block, and that the dark rule is presentFiles: src/apps/door.ts, test/door-scheme.test.ts
Risks: a hand-written hash would break the style silently; keep it derived from STYLE.
Before pushing:
bun x tsc --noEmitandbun test test/door-scheme.test.ts test/apps-door.test.ts.