2012-11-30

Fixed-width fonts in Gmail

I keep having to search my email for instructions I mailed out to colleagues to get fixed-width fonts in Gmail under Firefox and Chrome. So, I'll make a post, instead. This is gleaned from various sources on the net.

First, for Firefox:
  1. Install the Stylish extension. This allows injection of CSS into web pages.
  2. In the Firefox Add-on management window, click on User Styles in the left hand column, and then click the Write New Style button.
  3. Enter the following userstyle "script", and then give a name, and save and close:

@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain("mail.google.com") {
    /* GMail messages and textarea should use fixed-width font */
    .gs .ii, .textarea, .editable {
    font-family: MonoSpace !important;
    }
}

If you use Firefox Sync to sync Firefox on different machines, you may want to install the Stylish Sync extension, which uses Firefox Sync to sync installed user styles.

If you don't want to write your own user style, you may be able to find one at userstyles.org.

For Chrome, I use a Greasemonkey script, i.e. injected Javascript. Chrome natively supports Greasemonkey userscripts. You could also use this on Firefox if you have Greasemonkey installed.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.