feat(web): remove height: 100vh for copy-paste HTML #2641
Merged
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.
If users were to copy-paste the HTML from one of our copy-paste components, it'd come with a
height: 100vhin one of the first elements coming fromreact-email/apps/web/components/_components/layout.tsx
Line 63 in d4d9efd
This will cause them to look badly, specially if they're trying to send it to themselves with the new Send button. This fixes that by simply replacing the
height:100vhwith nothing in the copy-paste component's HTMLThe main reason we have that
100vhin the first place is just so that the copy-paste components look good in the iframes that we render them in on https://react.email/components, so this is ok.Summary by cubic
Removed the height: 100vh style from copy-paste component HTML and Send markup so emails don’t render full-viewport height. This keeps iframe-only styling out of exported HTML, ensuring copied/sent templates display correctly in email clients.
Written for commit 60019e0. Summary will update automatically on new commits.