算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
49-html-email-template-global【设计与创意】Use when responsive HTML email has to render correctly in every client — table-based structure, inline CSS, 600px max width, dark mode handling, quirks for Gmail, Apple Mail, Outlook and Yahoo, bulletproof buttons, and a pre-send test checklist, shipping a self-contained .html file to paste into Klaviyo, Mailchimp, HubSpot, or Brevo. Trigger on 'HTML…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: 49-html-email-template-global
description: "Use when responsive HTML email has to render correctly in every client — table-based structure, inline CSS, 600px max width, dark mode handling, quirks for Gmail, Apple Mail, Outlook and Yahoo, bulletproof buttons, and a pre-send test checklist, shipping a self-contained .html file to paste into Klaviyo, Mailchimp, HubSpot, or Brevo. Trigger on 'HTML email', 'code an email template', 'responsive email', 'why does my email break in Outlook', 'email dark mode is broken', 'the newsletter looks wrong on mobile'. Not for — sequence strategy and subject lines, see 14-email-marketing-global; a web page, see 12-landing-page-brief-global; brand colors and fonts, see 46-brand-guideline-global."
metadata:
version: 1.0.1
category: operations
license: MIT
triggers:
Email HTML is not web HTML: it needs table layout, inline CSS, and avoidance of everything clients do not support. The bar is simple — it looks right in Gmail, Apple Mail, Outlook, and Yahoo, and it reads on a 375px phone. No exceptions. Content and sequence come from 14-email-marketing-global; this skill handles the code.
Read the brand guideline (46-brand-guideline-global) and the email content from 14-email-marketing-global if available. If information is missing, ask up to 4 questions:
<style> blocks; keep only media queries and dark-mode rules in <style>, and inline everything else.img needs alt text plus width and height attributes so a blocked-image inbox still reads correctly.| Layout | Use for |
|---|---|
| Single column | Broadcast, nurture — most readable, fewest rendering bugs |
| Two column (image + text) | Offer emails with a product image |
| Multi-section newsletter | Digest, updates — one table block per section |
Container: 600px desktop / 100% mobile
Outer background: light neutral (e.g. #F4F4F4)
Body background: [background color] (usually white)
Font: '[body font]', Arial, Helvetica, sans-serif
Body font-size: 16px / line-height: 1.6
Mobile breakpoint: max-width 480px
Design tokens come from the brand guideline:
display:inline-block, no underline. Outlook Windows will not draw border-radius — accept the square fallback, and never use an image as the button.ul for safer rendering, optional secondary CTA.@media only screen and (max-width: 480px) {
/* container: 100% width */
/* body font: 15px */
/* CTA: full width, centered */
/* padding: 24px 20px */
/* images: 100% width */
}
Dark mode:
<meta name="color-scheme" content="light dark"> and <meta name="supported-color-schemes" content="light dark">.@media (prefers-color-scheme: dark) is only partially supported: Apple Mail honors it well; Gmail typically applies its own color inversion and ignores the media query; Outlook may force a full invert.14-email-marketing-global| ESP | First-name merge tag | Unsubscribe |
|---|---|---|
| Klaviyo | {{ first_name|default:"there" }} | {% unsubscribe %} |
| Mailchimp | *|FNAME|* | *|UNSUB|* |
| HubSpot | {{ contact.firstname }} | injected automatically |
| Brevo | {{ contact.FIRSTNAME }} | {{ unsubscribe }} |
Always confirm the exact syntax in the sending platform before the final send — an unrendered merge tag in a live send is a visible error.
| Client | Rendering behavior | What to do about it |
|---|---|---|
| Gmail (web and app) | May strip <style> in some contexts; applies its own dark-mode inversion | Inline everything; the single-column layout must read even if media queries are dropped |
| Apple Mail (macOS/iOS) | WebKit — the most capable renderer | Supports media queries and prefers-color-scheme properly; use it as the dark-mode reference |
| Outlook desktop (Windows) | Word rendering engine | Tables only; no border-radius, unreliable background images (use solid colors); test separately |
| Outlook.com / new Outlook | Chromium-based, much better than desktop | Still avoid flex and grid for consistency with desktop |
| Outlook mobile (iOS/Android) | Reasonable modern rendering | Verify CTA tap targets at 44px minimum height |
| Yahoo Mail / AOL | Decent support, varies by build | Send a real test to a live account |
| Mobile in general | 375px screens | Body font 15px or larger, CTA at least 44px tall for thumbs |
Apple Mail Privacy Protection pre-fetches tracking pixels, which inflates reported open rates for any list with a meaningful Apple Mail share — and Gmail image proxying adds noise of its own. Treat open rate as a directional signal only. Judge template and campaign performance on click-through rate, click-to-open rate, and conversions. Global email medians for context: open 22-27%, CTR 2.5-3.5%, CTOR 10-14%, unsubscribe below 0.5%.
14-email-marketing-global)14-email-marketing-global: strategy, sequence, content, and subject lines — written before the code.46-brand-guideline-global: colors, fonts, and logo for the email design tokens.47-design-review-global: review the email before sending (brand, readability, CTA, platform fit).12-landing-page-brief-global: the CTA usually lands on a landing page — keep the message consistent across both.