Skip to content

fix(react-email): preserve local CSS variable overrides - #3795

Open
MokiMeow wants to merge 1 commit into
resend:canaryfrom
MokiMeow:fix/local-tailwind-variable-overrides
Open

MokiMeow wants to merge 1 commit into
resend:canaryfrom
MokiMeow:fix/local-tailwind-variable-overrides

Conversation

@MokiMeow

@MokiMeow MokiMeow commented Oct 19, 2026 •

Copy link
Copy Markdown

Closes #3794.

A custom utility that overrides a theme variable currently renders with the earlier root value. For example, a blue local --color-brand becomes red in the email's inline style.

Select the winning declaration in the same block before falling back to global definitions. Preserve existing direct !important matching and nested-rule checks. Index local definitions once; this does not implement the full CSS cascade.

Validation on Windows with Node 24 and pnpm 11:

  • 158 Tailwind tests pass, including local overrides, declaration order, important defaults and public rendering.
  • pnpm lint, pnpm --filter react-email typecheck and pnpm --filter react-email build pass.
  • The minimal reproduction fails on 6.11.3 and passes against the built, installed tarball.
  • Full package suite: 325 pass, 4 fail. The same four CLI export/path assertions fail on untouched code; no new failures. They concern plugin process exit, two dynamic-import alias cases and root-directory matching.

Summary by cubic

Fixes local theme-variable overrides in custom utilities being ignored in favor of earlier global defaults.

  • Selects the winning declaration within the same block before falling back to global definitions.
  • Preserves existing !important matching and nested-rule checks.
  • Indexes local definitions once rather than implementing the full CSS cascade.

Written for commit 9586bff. Summary will update on new commits.

View guided diff

@vercel

vercel Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

@MokiMeow is attempting to deploy a commit to the resend Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot

changeset-bot Bot commented Oct 19, 2026

Copy link
Copy Markdown

馃 Changeset detected

Latest commit: 9586bff

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 Patch
@react-email/editor Patch
@react-email/ui 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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

linear-synced PR has been synced to Linear

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tailwind: local custom-property values are overridden by root defaults

1 participant