Improve global.css as scaffolding template (#403)

Update `global.css` in all `basic-server-*` examples (and `integration-server`
for consistency) to better serve as templates for AI coding agents scaffolding
new MCP Apps.

Changes:
- Use CSS custom properties (`--font-sans`, `--color-text-primary`, etc.) with
  sensible fallbacks, enabling host design system integration
- Add `color-scheme: light dark` and `light-dark()` fallbacks for theme support
- Include comprehensive typography: h1-h6, body text, `code`/`pre`/`kbd`, `b`/`strong`
- Move `#server-time` styles from global CSS to component stylesheets (classes
  instead of IDs for better CSS practices)

Updates E2E test selectors in `DYNAMIC_MASKS` to match the new class-based
selectors.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Jonathan Hefner 2026-01-29 16:55:24 -06:00 • committed by GitHub
commit 6905aa8edc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 315 additions and 56 deletions

View file

@ -7,14 +7,14 @@ import { test, expect, type Page, type ConsoleMessage } from "@playwright/test";
//
// Note: map-server uses SLOW_SERVERS timeout instead of masking to wait for tiles
const DYNAMIC_MASKS: Record<string, string[]> = {
integration: ["#server-time"], // Server time display
"basic-preact": ["#server-time"], // Server time display
"basic-react": ["#server-time"], // Server time display
"basic-solid": ["#server-time"], // Server time display
"basic-svelte": ["#server-time"], // Server time display
integration: ['[class*="serverTime"]'], // Server time display [CSS module]
"basic-preact": ['[class*="serverTime"]'], // Server time display [CSS module]
"basic-react": ['[class*="serverTime"]'], // Server time display [CSS module]
"basic-solid": ['[class*="serverTime"]'], // Server time display [CSS module]
"basic-svelte": [".server-time"], // Server time display (component-scoped)
"basic-vanillajs": ["#server-time"], // Server time display
"basic-vue": ["#server-time"], // Server time display
"cohort-heatmap": ['[class*="heatmapWrapper"]'], // Heatmap grid (random data)
"basic-vue": [".server-time"], // Server time display (scoped styles)
"cohort-heatmap": ['[class*="heatmapWrapper"]'], // Heatmap grid (random data) [CSS module]
"customer-segmentation": [".chart-container"], // Scatter plot (random data)
"debug-server": ["#event-log", "#callback-table-body"], // Event log and callback counts (dynamic)
quickstart: ["#server-time"], // Server time display

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Before After
Before After