Skip to content

feat(editor): email-safe font families in the theme - #3904

Draft
danilowoz wants to merge 3 commits into
canaryfrom
claude/brave-albattani-i9q4li
Draft

danilowoz wants to merge 3 commits into
canaryfrom
claude/brave-albattani-i9q4li

Conversation

@danilowoz

@danilowoz danilowoz commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Adds email-safe font families to the editor theme, as the base for a font picker in the Resend broadcast editor. resend/resend-monorepo#14764 already uses this branch's build through a pnpm patch.

What changes

  • EMAIL_FONTS (exported from @react-email/editor/plugins): web-safe font stacks only.
    • Fonts: Default (the existing system stack), Arial, Helvetica, Verdana, Tahoma, Trebuchet MS, Georgia, Times New Roman and Courier New.
    • Every stack ends in a generic family.
    • No web fonts are loaded, so the email makes no request to fonts.googleapis.com.
  • fontFamily theme property: it is now a KnownCssProperties / SUPPORTED_CSS_PROPERTIES select. The basic theme's Text panel has a "Font" input on body.
  • Blockquote: it no longer hardcodes its own font stack, so it follows the body font. Code stays monospace.
  • Serializer: the body font is repeated on the container table, because Outlook does not inherit the <body> font into tables.
  • Fix for ThemeConfig overrides: a { body: { fontFamily } } override used to be added as a duplicate input in the body group, where the typography group's input overwrote it. The lookup now searches every group, which also fixes body.fontSize overrides.

The 4 updated container.spec.tsx snapshots only gain the font-family on the container table.

Checks

  • vitest --project unit: 555 pass, including fonts.spec.tsx.
  • tsc --noEmit and biome check are clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ThnJ4Yz175LLQEJnjvNtzY

Add EMAIL_FONTS (web-safe stacks plus Inter, Roboto, Open Sans, Lato), a
fontFamily theme property and a Font input in the basic text panel. The
body font is repeated on the container table for Outlook, and web fonts
used by the theme or a fontFamily mark get a stylesheet link in <head>.

Also fix ThemeConfig body overrides landing in a duplicate input when the
property lives in the typography group.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ThnJ4Yz175LLQEJnjvNtzY
@vercel

vercel Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
react-email Ready Ready Preview Nov 13, 2026 1:01pm UTC
react-email-demo Ready Ready Preview Nov 13, 2026 1:01pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e48c6d2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@react-email/editor Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@react-email/editor@3904

commit: e48c6d2

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 10 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Collect fontFamily from every merged theme component, not only the body,
so a web font configured on a heading or other component gets its
stylesheet link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ThnJ4Yz175LLQEJnjvNtzY
@danilowoz danilowoz changed the title feat(editor): Email-safe font families in the theme feat(editor): email-safe font families in the theme Nov 13, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 2 files (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: The font picker is bounded, but using web fonts adds Google Fonts requests to recipient emails and may render differently across clients. Human review should approve that privacy and compatibility tradeoff.

View guided diff | Re-trigger cubic

Keep only web-safe font stacks so emails and the editor load nothing
from fonts.googleapis.com, and remove the web font <link> emission.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ThnJ4Yz175LLQEJnjvNtzY

@klotty klotty left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 4 files (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Adds email-safe font choices and a Font select to the editor theme, repeats the body font on the container for Outlook, and fixes ThemeConfig body overrides. Web-font loading was dropped, removing the external-request and client-rendering risks.

View guided diff | Re-trigger cubic

This branch was successfully deployed

2 active deployments
Preview – react-email-demo — e48c6d27 Deployed Nov 13, 2026 by vercel[bot]
Preview – react-email — e48c6d27 Deployed Nov 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants