# HTML Boilerplate & Theme Tokens Reference This document provides self-contained HTML/CSS templates optimized for MCP Apps iframes across dark and light modes. --- ## 1. Universal Theme Tokens Mapping Host applications inject different CSS variables into iframes. Use this resilient CSS custom properties cascade to guarantee proper contrast regardless of the host: ```css :root { /* Surface & Background */ --app-bg: var(--background, #ffffff); --card-bg: var(--card, #f8fafc); --border-color: var(--border, #e2e8f0); /* Typography */ --text-main: var(--foreground, #0f172a); --text-muted: var(--muted-foreground, #64748b); /* Accents & States */ --primary-color: var(--primary, #2563eb); --primary-text: var(--primary-foreground, #ffffff); --hover-bg: rgba(148, 163, 184, 0.12); } @media (prefers-color-scheme: dark) { :root { --app-bg: var(--background, #0f172a); --card-bg: var(--card, #1e293b); --border-color: var(--border, #334155); --text-main: var(--foreground, #f8fafc); --text-muted: var(--muted-foreground, #94a3b8); } } ``` --- ## 2. Standard Responsive Card Template ```html