Skip to content
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

Over-scaled and unreadable mail body on mobile #8460

Open
5 tasks
hrb-hub opened this issue Feb 4, 2025 · 0 comments · Fixed by #8461
Open
5 tasks

Over-scaled and unreadable mail body on mobile #8460

hrb-hub opened this issue Feb 4, 2025 · 0 comments · Fixed by #8461
Assignees
Milestone

Comments

@hrb-hub
Copy link
Contributor

hrb-hub commented Feb 4, 2025

  • Mail bodies containing preformatted text (<pre>) tend to get over-scaled and become unreadable on mobile due to the preformatted text not being broken up as it should. This is caused by the styling not being applied due to an incorrect selector. fixing this would already improves scaling and readability on mobile for mail bodies that contain <pre>.
  • Mail bodies can also get over-scaled and become unreadable when they contain a long unbreakable line of text, like a long plain text url for example. A solution to this could be to wrap these unbreakable long lines of text using something like overflow-wrap: anywhere when scaling exceeds a certain threshold.

Test notes

  • Preformatted text wraps on mobile but not on desktop or web.
  • On mobile:
    • Super long unbroken text (like a long plain text url) is wrapped and the mail is readable without the need to zoom.
    • Zoomed out mails are still readable.
    • Formatting of HTML emails (like newsletters, etc...) is preserved, or at the very least close.

Time spent: 2.5h

@hrb-hub hrb-hub linked a pull request Feb 4, 2025 that will close this issue
@hrb-hub hrb-hub self-assigned this Feb 4, 2025
hrb-hub added a commit that referenced this issue Feb 5, 2025
When scaling exceeds a threshold of 0.65, unbreakable long text is
wrapped by setting the mail body's "overflowWrap" to "anywhere".
Scaling might also be applied on top, if necessary.

0.65 was chosen as a threshold since a 0.65 scaling applied to a 16px
font size would result in a 10.4px font size.

Close #8460
@hrb-hub hrb-hub added this to the Next Release milestone Feb 10, 2025
charlag pushed a commit that referenced this issue Feb 10, 2025
When scaling exceeds a threshold of 0.65, unbreakable long text is
wrapped by setting the mail body's "overflowWrap" to "anywhere".
Scaling might also be applied on top, if necessary.

0.65 was chosen as a threshold since a 0.65 scaling applied to a 16px
font size would result in a 10.4px font size.

Close #8460
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant