Repository navigation
Conversation
|
Contributor
|
@hsusul is attempting to deploy a commit to the resend Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Button copies numeric padding longhands onto the anchor after the author's style. An unparsed token became 0, and that longhand replaced
calc()andvar(). A unitless0failed the same parser, so the pixel sides of a shorthand never became longhands and Outlook's spacer stayed at 0.Fixes #3929
What changed
A unitless
0counts as a length. Each side of a shorthand converts on its own. A side that iscalc()orvar()stays on the originalpaddingdeclaration and is not written as 0.Scope
Button padding parsing and the longhands Button writes onto the anchor.
Tradeoffs
A length this parser cannot convert, such as
15cmon one side of a mixed shorthand, still does not become a numeric longhand. The author'spaddingdeclaration remains.Blast Radius
12px 20pxand9pt 15ptstill become pixel longhands. Purecalc()andvar()no longer gainpadding-*:0.Verification
Rendered the Button with
@react-email/renderafter esbuild, on canarybeda35bbplus this branch.calc(8px + 4px)keeps its declaration and has nopadding-top:0.0 16pxrenderspadding-right:16px;padding-left:16pxwithmso-font-width:400%.12px 0rendersmso-text-raise:18px. The projectpnpmtest was not run.pnpmin this environment cannot start.Summary by cubic
Fixes Button padding parsing so
calc()andvar()values stay as written instead of being replaced bypadding-*:0longhands, and unitless0now counts as a valid length. Resolves #3929.paddingdeclaration.0 20pxnow generate all four longhands, so Outlook spacers still render correctly.8px calc(4px + 4px)write longhands only for the convertible side.15cm) fall back to the original declaration and don't produce longhands.Written for commit 986d43a. Summary will update on new commits.