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>
|
|
@ -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
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 35 KiB |