6

I went searching for this answer myself today after upgrading from Lion to Yosemite. In earlier versions of Apple Mail, one could use an undocumented preference to set a minimum font size for reading messages:

defaults write com.apple.mail MinimumHTMLFontSize 12

I found several references lamenting that it no longer had any effect in Mavericks or Yosemite, and that it was no longer possible to affect font sizes when reading HTML messages.

Not satisfied, I dug into the mail.app bundle and found a (partial) solution myself and will post it below. If anyone has a better solution though, I'm all ears!

5

This is not exactly the same as the minimum font size setting that was previously available, but it can rectify the issue in most irritating cases. (Namely, email from outlook users)

Mail.app has a CSS resource file that it loads in the Webkit view used to render messages. You can find it in the Mail.app bundle here:

/Applications/Mail.app/Contents/Resources/Message.css

You can add a simple CSS rule to improve your reading experience. (You could go crazy affecting styles in here too if you were so inclined...)

The biggest offender for tiny message text I've seen comes from using the size attribute on font tags. Adding this rule resolves that issue without being too opinionated about font sizes otherwise:

font[size="1"],
font[size="2"], 
font[size="3"],
[style*="font-size:5px"],
[style*="font-size: 5px"],
[style*="font-size:6px"],
[style*="font-size: 6px"],
[style*="font-size:7px"],
[style*="font-size: 7px"],
[style*="font-size:8px"],
[style*="font-size: 8px"],
[style*="font-size:9px"],
[style*="font-size: 9px"],
[style*="font-size:10px"],
[style*="font-size: 10px"],
[style*="font-size:11px"],
[style*="font-size: 11px"],
[style*="font-size:small"],
[style*="font-size: small"],
[style*="font-size:x-small"],
[style*="font-size: x-small"],
[style*="font-size:xx-small"],
[style*="font-size: xx-small"] {
    font-size: inherit !important;
}

You need root privileges to edit this file. Open it in TextWrangler/BBEdit or another text editor that allows you to save with an admin password, or edit in the shell with sudo:

sudo echo -e "\nfont[size="1"],\nfont[size="2"],\nfont[size="3"] {\n font-size: inherit !important;\n}" >> /Applications/Mail.app/Contents/Resources/Message.css

If I come across further patterns to target, I'll update this answer to include them.

EDIT: I added attribute selectors to target font-size declarations, per @danw's suggestion. I expended his selectors to cover spaces in the style attribute's string, and to cover explicit pixel sizes below 12px.

1

The pointer to /Applications/Mail.app/Contents/Resources/Message.css was great, and helped me resolve a similar problem with some Gmail replies containing

<div class="gmail_default" style="font-size:small">

For Gmail, I found this resolves the problem for those:

[style*="font-size:small"] { font-size: inherit !important; }

You may want to also handle x-small and xx-small, too:

[style*="font-size:small"], [style*="font-size:x-small"], [style*="font-size:xx-small"] { font-size: inherit !important; }

  • I'm sorry. Where is the +10 button. I keep on excitedly pressing the plus arrow but it just toggles. Thanks so much! – Gray Jul 28 '15 at 19:08
  • Good addition @danw. I've amended my answer to incorporate your selectors, and expanded on them slightly. (A bit late replying to this - just came back to my question to update a new Mac install and saw your answer.) – David Twist Dec 2 '15 at 22:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .