CSS and Tailwind
Style executable email templates with imported CSS and Tailwind, inspect compatibility findings, and use email primitives for layout.
Email templates import CSS and use the Tailwind compiler with their project configuration. The compiler applies cascade and specificity, inlines applicable declarations and retains supported head and media rules. Inline styles keep normal precedence. Use source-discoverable classes; dynamic class construction can produce diagnostics rather than the intended styling.
Use email primitives for table layouts and Outlook fallbacks. General flex or grid layouts are not automatically translated to email tables. Compatibility findings identify known constraints; browser previews do not prove rendering in every email client.
Supported HTML
These elements come from the table shared by the JSX types and HTML serializer:
a, article, b, blockquote, body, br, caption, center, code, col, colgroup, div, em, footer, h1, h2, h3, h4, h5, h6, head, header, hr, html, i, img, li, main, meta, ol, p, pre, s, section, small, span, strong, style, table, tbody, td, tfoot, th, thead, title, tr, u, ul.
Use supported style properties and inspect compiler diagnostics for unsupported declarations or selectors. See email components and responsive and dark styles.