← Files TrialAgents IntelARCHIVED FILE
references/custom-style.md
4.97 KB · Nov 30, 2026 · 07:39 UTC
# Custom view defaults Use these defaults unless the user requests another style. Select useful sections and customize them to the actual question and authorized data; never reproduce the entire example gallery by default. - Start immediately with the title, then an optional concise summary. Omit decorative mastheads, category eyebrows and badges. Keep meaningful scope and source notes. - Center the view in a maximum 1,104px container with 32px outer padding and a white 12px-radius frame. Use 40px inner padding on desktop and 20px on phones; 28px section gaps, 24px panel padding (18px on phones), and 16px metric gaps. Avoid duplicating a frame if the host already supplies it. - Typography: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif. Use 28px/600 title (25px mobile), 20px/600 headings, 16px body, 14px chart/table labels and 12px secondary notes. The sandbox cannot fetch fonts; retain a system fallback rather than promising Inter will always render. - Surfaces: default to a light canvas and white or pale panels with dark primary text and readable secondary text. Avoid dark page, hero, section and card backgrounds unless the user explicitly requests a dark theme. Keep one frame per component. Choose colors by contrast and semantic role; no fixed text/background palette is required. - Use one coherent color family within each chart and vary families between charts: green #347f55/#55a776/#91bfa1; blue #234b83/#3975b8/#80a9d5/#c5d9ed; purple #65458d/#8762b1/#b49bce/#e0d4ed; orange #925220/#c77938/#e8ba87/#fcf5ed. Use dark text on pale fills, visible labels and exact legend matches. Gray #b0bab4 represents unknowns, not zero. Respect semantic status colors and explicit user palettes. - Label values, units, denominators and missing data. Use shared scales across comparable rows. Do not use an attrition funnel for unrelated populations. Distinguish user plans from observed evidence. - Use full-width semantic tables inside a horizontal scroll container. Keep timelines scrollable at narrow widths; stack metric cards and chart labels on phones rather than shrinking all text. Keep page-level overflow absent. - For inline CSS/JS use the existing interactive renderer and self-contained HTML. Static rendering uses server-provided CSS and supported semantic classes only; the static shell remains a fallback. Never request network assets, alter sandbox policy or change MCP tools for styling. - Trackers use the existing state bridge and deliberate host Save changes action. Restore fields before calculating derived summaries; programmatic updates must update draft state. Never imply automatic persistence. ## Text and background contrast - Treat each foreground/background combination as a pair. In interactive HTML, define semantic color tokens for canvas, surface, primary text, secondary text and accents. Explicitly set both background and text color on the document and each differently colored surface. Use color-scheme:light for the default light view; do not auto-switch themes based on ChatGPT or operating-system dark mode. - Explicitly style headings, large metric values, chart labels, legends, table headers/cells, notes, links and controls against their actual local background. Setting body color alone is insufficient: renderer defaults or component rules can override inherited colors. For SVG text set fill; for canvas text set fillStyle. Keep custom CSS in renderer=interactive; static views must use the supported light semantic shell. - Target at least 4.5:1 contrast for all informational text, including large headings, metrics and secondary notes. Target at least 3:1 for essential chart marks, control boundaries and focus indicators against adjacent colors. Accent palettes are flexible; brand colors never take priority over readability. - Place chart labels outside colored marks on a light surface by default. If text must sit inside a bar or badge, choose its foreground separately for that exact fill. A label color that works on one bar may fail on another. - Avoid low-opacity text, gradient-backed text and translucent panels behind text. Use opaque surfaces and solid text colors by default. When transparency or gradients are explicitly requested, check contrast against the least favorable composited background. Never assume that muted, branded or large text is readable. - Before saving, check every text role and each selected, hover, focus and disabled control state. When rendering/contrast tools are available, inspect computed colors and measure contrast; otherwise use conservative dark-on-light pairs and do not claim a measured check. If a dark theme is explicitly requested, set all foreground roles explicitly and apply the same contrast targets; do not just darken the surfaces. Read the create-custom-view design patterns for chart selection, source rules and pre-save checks. The branded gallery demonstrates horizontal bars, a blue attrition funnel, a purple planning timeline and an editable tracker; the other SVG examples remain available for different questions.
SHA-256: 49b598a9598e03cd47b5a94553b3b313083f1b7d5971d56ea3c2ec5bf5485e4e