Skip to content

fix(button): add px unit to mso-text-raise on Outlook spacer#3591

Merged
dielduarte merged 2 commits into
resend:canaryfrom
yashs33244:fix/button-mso-text-raise-unit
Jul 2, 2026
Merged

fix(button): add px unit to mso-text-raise on Outlook spacer#3591
dielduarte merged 2 commits into
resend:canaryfrom
yashs33244:fix/button-mso-text-raise-unit

Conversation

@yashs33244

@yashs33244 yashs33244 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

What

Button builds the left Outlook padding spacer as a raw string and interpolates the vertical raise without a unit:

const textRaise = pxToPt(y);          // a bare number, e.g. 18
`mso-font-width:${plFontWidth * 100}%;mso-text-raise:${textRaise}" hidden>…`

That renders mso-text-raise:18, which Outlook treats as invalid (a non-zero length needs a unit), so the hair-space spacer isn't raised. The sibling button label sets the same property through a React style object (msoTextRaise: pxToPt(paddingBottom)), which React serializes with a unit (mso-text-raise:9px), so the two were inconsistent.

Fix

Append px to the spacer's raise value so it matches the label (mso-text-raise:18px). One-line change; the 18:9 ratio is unchanged. Updated the three affected inline snapshots (mso-text-raise:18 -> 18px, and two :0 -> :0px).


Summary by cubic

Fixes the Outlook padding spacer in Button by adding the px unit to mso-text-raise on the left [if mso] spacer. Outlook now applies the raise correctly, matching the label.

  • Bug Fixes
    • Updated remaining inline snapshots to expect px on mso-text-raise (18 -> 18px, 0 -> 0px).

Written for commit e34fe66. Summary will update on new commits.

Review in cubic

Copilot AI review requested due to automatic review settings June 23, 2026 07:39
@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

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

A member of the Team first needs to authorize it.

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@changeset-bot

changeset-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e34fe66

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

@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.

No issues found across 3 files

Confidence score: 5/5

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

Auto-approved: Fix mso-text-raise CSS property to include required 'px' unit for Outlook compatibility. Changes are isolated to a single line in the Button component and its test snapshots, with no logic or architectural impact.

Re-trigger cubic

@github-actions github-actions Bot added the linear-synced PR has been synced to Linear label Jun 23, 2026
@dielduarte dielduarte force-pushed the fix/button-mso-text-raise-unit branch from 9264b52 to 1ae885c Compare July 2, 2026 20:52
The left [if mso] spacer interpolated the raise value as a bare number
(mso-text-raise:18), which Outlook treats as invalid CSS, so the spacer
was not raised to match the button label. The sibling label already
emits the unit via React; append px here too.
@dielduarte dielduarte force-pushed the fix/button-mso-text-raise-unit branch from 1ae885c to 030859b Compare July 2, 2026 21:03
@pkg-pr-new

pkg-pr-new Bot commented Jul 2, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: e34fe66

@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
react-email Ready Ready Preview, Comment Jul 2, 2026 9:14pm
react-email-demo Ready Ready Preview, Comment Jul 2, 2026 9:14pm

@dielduarte dielduarte force-pushed the fix/button-mso-text-raise-unit branch from 030859b to e34fe66 Compare July 2, 2026 21:10
@dielduarte dielduarte merged commit b4ac0d5 into resend:canary Jul 2, 2026
14 of 15 checks passed
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.

3 participants