Skip to content

Commit 52050cf

Browse files
committed
fix(gallery): force light color-scheme in MCP iframe + A2UI host
The MCP Apps bundle declared color-scheme: light dark but the CSS variables only had light-mode values, leaving dark-mode OS users with dark text on a dark UA canvas. The @a2ui/lit renderer respected prefers-color-scheme too, muting "Latest" and subtitles into the gallery's light card background. Force light mode in both surfaces and give the MCP body an opaque white background so the iframe canvas can't bleed through.
1 parent e2bcd3a commit 52050cf

3 files changed

Lines changed: 124 additions & 114 deletions

File tree

gallery/build.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,10 @@ main { max-width: 1400px; margin: 0 auto; padding: 32px 24px 80px; }
286286
border: 1px solid var(--border);
287287
border-radius: 8px;
288288
padding: 12px;
289+
/* Gallery is light-themed; force the lit renderer's CSS to render
290+
* in light mode regardless of OS preference. color-scheme inherits
291+
* into the component's shadow DOM. */
292+
color-scheme: light;
289293
}
290294
.a2ui-host[data-mounted="0"]::after {
291295
content: "loading @a2ui/lit from esm.sh…";
@@ -370,6 +374,7 @@ main { max-width: 1400px; margin: 0 auto; padding: 32px 24px 80px; }
370374
border: 0;
371375
border-radius: 8px;
372376
background: white;
377+
color-scheme: light;
373378
}
374379
.mcp-attribution {
375380
font-size: 11px; color: var(--muted); margin-top: 8px;

0 commit comments

Comments
 (0)