Skip to content

fix(react-email): convert pt padding on Button instead of zeroing it - #3804

Open
hsusul wants to merge 1 commit into
resend:canaryfrom
hsusul:fix/button-pt-padding
Open

hsusul wants to merge 1 commit into
resend:canaryfrom
hsusul:fix/button-pt-padding

Conversation

@hsusul

@hsusul hsusul commented Oct 24, 2026

Copy link
Copy Markdown

Closes #3802.

convertToPx returned 0 for pt, and Button writes the converted longhands after the user's padding, so padding: '9pt 15pt' (or px-[15pt] py-[9pt]) rendered a button with no padding in any client and zeroed the Outlook spacers.

This adds pt to the units convertToPx handles (1pt = 4/3px). That keeps the existing approach of converting padding to px, and 9pt 15pt now renders the same as 12px 20px.

Units that still have no px equivalent here (calc(), var(), viewport units) are left as they were.

Tests

  • A convertToPx('9pt') unit test and a render test asserting the longhands and the Outlook spacer values. Both fail on canary.
  • pnpm test in packages/react-email (316 passed), pnpm typecheck and pnpm lint all pass locally.

It touches the same file as #3793 but not the same lines; #3793 applies cleanly on top.

@changeset-bot

changeset-bot Bot commented Oct 24, 2026

Copy link
Copy Markdown

馃 Changeset detected

Latest commit: 63f0f50

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

@vercel

vercel Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

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

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the linear-synced PR has been synced to Linear label Oct 25, 2026

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.

Button: padding in pt is replaced with 0

1 participant