mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-25 08:35:16 +08:00
Fixes T1731: code in iframes renders with white-space: normal
Summary: Fixes T1731 Chrome by default on a user-agent stylesheet sets white-space to `pre`. For `pre` elements. This is useful in most cases since whitespace is taken literally. Unfortunately when people send out emails with code in them, the `pre` blocks can get mangled because there may be unnecessary whitespace in them. I personally think the default behavior is much better, however, I think we should have `pre` blocks render with `white-space: normal` because anyone who's sending an email with code it in will probably use <span> and <br> and inline styles to ensure it looks correct on most readers. Since many places (like Outlook) strip whitespace out of HTML, I think we should mimic that behavior too. Test Plan: edgehill --test Reviewers: bengotow Reviewed By: bengotow Maniphest Tasks: T1731 Differential Revision: https://phab.nylas.com/D1561
This commit is contained in:
parent
337e7a0cd9
commit
f399e76408
1 changed files with 4 additions and 0 deletions
|
@ -62,6 +62,10 @@ EmailFixingStyles = """
|
|||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
pre {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #2794c3;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue