Skip to content

fix(tailwind): non-inlined styles getting HTML entities on React 18#2858

Merged
gabrielmfern merged 7 commits intocanaryfrom
fix/react-18-html-entities-in-styles
Jan 20, 2026
Merged

fix(tailwind): non-inlined styles getting HTML entities on React 18#2858
gabrielmfern merged 7 commits intocanaryfrom
fix/react-18-html-entities-in-styles

Conversation

@gabrielmfern
Copy link
Member

@gabrielmfern gabrielmfern commented Jan 19, 2026

Closes #2841


Summary by cubic

Switched style injection to use dangerouslySetInnerHTML so React 18 doesn’t HTML-encode generated CSS.

Written for commit 5af8933. Summary will update on new commits.

@gabrielmfern gabrielmfern self-assigned this Jan 19, 2026
@changeset-bot
Copy link

changeset-bot bot commented Jan 19, 2026

🦋 Changeset detected

Latest commit: 5af8933

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

This PR includes changesets to release 3 packages
Name Type
@react-email/tailwind Patch
@react-email/components Patch
playground Patch

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

@vercel
Copy link

vercel bot commented Jan 19, 2026

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

Project Deployment Review Updated (UTC)
react-email Ready Ready Preview, Comment Jan 20, 2026 4:57pm
react-email-demo Ready Ready Preview, Comment Jan 20, 2026 4:57pm

Request Review

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 19, 2026

Open in StackBlitz

npm i https://pkg.pr.new/resend/react-email/@react-email/tailwind@2858

commit: 5af8933

@gabrielmfern gabrielmfern changed the title use inner html for generated css fix(tailwind): non-inlined styles getting HTML entities on React 18 Jan 19, 2026
@gabrielmfern gabrielmfern marked this pull request as ready for review January 19, 2026 16:34
@gabrielmfern gabrielmfern force-pushed the fix/react-18-html-entities-in-styles branch from 72a5942 to 594a932 Compare January 19, 2026 16:36
Copy link
Contributor

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

Choose a reason for hiding this comment

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

cubic analysis

No issues found across 1 file

Linked issue analysis

Linked issue: OSS-18: Find a way to make the <Font> component work properly on Windows Outlook

Status Acceptance criteria Notes
⚠️ Make the component work properly on Windows Outlook Preserves raw CSS but no inlining or selector change
Avoid using the universal '*' CSS selector (unsupported on Windows Outlook) No removal or replacement of '*' selector in diffs
Inline font-family style into all elements (so Windows Outlook gets the font even without '*' support) No implementation of inlined font-family across elements

@gabrielmfern
Copy link
Member Author

@cubic-dev-ai review this

@cubic-dev-ai
Copy link
Contributor

cubic-dev-ai bot commented Jan 20, 2026

@cubic-dev-ai review this

@gabrielmfern I have started the AI code review. It will take a few minutes to complete.

Copy link
Contributor

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

Choose a reason for hiding this comment

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

cubic analysis

No issues found across 2 files

Linked issue analysis

Linked issue: OSS-18: Find a way to make the <Font> component work properly on Windows Outlook

Status Acceptance criteria Notes
Stop relying on the universal (*) CSS selector in the component No changes to Font or selector usage in diffs
Apply font-family via inline styles to elements (inline all elements) No inlining logic or Font component changes present
Ensure works properly on Windows Outlook (avoid unsupported selectors) PR only updates Tailwind style injection, not Font compatibility

@gabrielmfern gabrielmfern merged commit a8764ee into canary Jan 20, 2026
16 of 17 checks passed
@gabrielmfern gabrielmfern deleted the fix/react-18-html-entities-in-styles branch January 20, 2026 17:12
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.

React Email v5 generates malformed CSS for responsive utilities

2 participants