-
Notifications
You must be signed in to change notification settings - Fork 687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with - react-email/components >=v0.29. Preview Code adds misplaced line breaks causing buttons not render in Outlook 2016 & 2019 clients #1813
Comments
Following on from this I believe it is due to the code preview incorrectly prettifies the code with miss placed linebreaks |
I have a very similar problem with buttons, but it is not correlated with preview Code. Apparently something changed between react-render This is the diff (before, after): < <td><a href="{{accept-invitation-url}}" style="line-height:normal;text-decoration:none;display:inline-block;max-width:100%;mso-padding-alt:0px;background-color:#02deaa;border:0px solid #333333;color:#ffffff;font-size:18px;font-weight:600;letter-spacing:0px;padding:16px 22px 16px 22px;text-align:center;text-transform:uppercase;box-shadow:0px 3px 0px #00C093;border-radius:35px;border-style:solid" target="_blank"><span><!--[if mso]><i style="mso-font-width:366.66666666666663%;mso-text-raise:24" hidden>   </i><![endif]--></span><span style="max-width:100%;display:inline-block;line-height:120%;mso-padding-alt:0px;mso-text-raise:12px">Accept Invitation</span><span><!--[if mso]><i style="mso-font-width:366.66666666666663%" hidden>   ​</i><![endif]--></span></a></td>
---
> <td>
> <a
> href="{{accept-invitation-url}}"
> style="line-height:normal;text-decoration:none;display:inline-block;max-width:100%;mso-padding-alt:0px;background-color:#02deaa;border:0px solid #333333;color:#ffffff;font-size:18px;font-weight:600;letter-spacing:0px;padding:16px 22px 16px 22px;text-align:center;text-transform:uppercase;box-shadow:0px 3px 0px #00C093;border-radius:35px;border-style:solid"
> target="_blank"
> ><span
> ><!--[if mso
> ]><i
> style="mso-font-width:366.66666666666663%;mso-text-raise:24"
> hidden
> >   </i
> ><!
> [endif]--></span
> ><span
> style="max-width:100%;display:inline-block;line-height:120%;mso-padding-alt:0px;mso-text-raise:12px"
> >Accept Invitation</span
> ><span
> ><!--[if mso
> ]><i
> style="mso-font-width:366.66666666666663%"
> hidden
> >   ​</i
> ><!
> [endif]--></span
> ></a
> >
> </td>
|
Describe the Bug
Hey,
react-email button component causes rendering issues on outlook clients 2016 and 2019. This is only present on react-email/component v0.29 or above. The button and any subsequent components do not render.
Packages:
I believe this is due to the code preview incorrectly prettifies the code with miss placed linebreaks as I have compared the output code between 0.28 and 0.29 and the only difference is the linebreaks.
Which package is affected (leave empty if unsure)
@react-email/button, @react-email/components
Link to the code that reproduces this issue
private repo
To Reproduce
Below is an example of the rendering issue:
This is what it should look like (this is taken form your website so I expect outlook to produce a lower quality version):
Expected Behavior
When I use react-email/component v0.28 it appears correctly
What's your node version? (if relevant)
No response
The text was updated successfully, but these errors were encountered: