Friday, February 5, 2010

Fixed-width font on Gmail again

Updated on February 2010 to fix the composing area to fixed font again.

Looks like Gmail changed the classes of their HTML elements again, as the last trick for fixed font stopped working.

Fortunately, the update is very simple:

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


As usual, the previous snippet should go into the userContent.css file under <your firefox profile>/chrome/

12 comments:

John Szakmeister said...

Thank you for this! I've been dying to have fixed width fonts in GMail.

Erin Sheldon said...

Excellent!

Adam Monsen said...

Thanks!

Do you know how to make it so the textarea for composing messages also uses a fixed-width font?

Leo Soto M. said...

Adam: I just updated the recipe to work with the composing area.

Adam Monsen said...

Rock! Works perfectly.

M. Bana said...

Thanks!

How do I apply this to the main UI? I.e., where all the messages are shown etc.

Is it possible to compose messages with fixed width fonts as well?

Leo Soto M. said...

I updated it to turn the compose area to fixed-font a few days ago. It should work (at least work for me and for Adam).

You could also extend the tweak to the main area by inspecting the css classes of the areas you want to alter (using Firebug or another similar tool) and then adding the selector to the customized CSS file. Personally, I like the main index with proportional font so I won't change the recipe to support that.

M. Bana said...

Do you know if such a hack works for Chrome, and if so how to do it?

Leo Soto M. said...

No, I guess it doesn't work with Chrome. You need to investigate how to apply user-specified CSS to web pages in Chrome. I'd be surprised if that's not possible.

gpoo said...

Go to 'labs' (right upper corner), search for 'Fixed width font' and choose 'Enable'. That should do the trick for any browser.

Leo Soto M. said...

Germán (gpoo):

Good tip! That would free me from updating the CSS trick each time GMail's UI changes.

Now, the Lab option works OK for displaying a particular message in fixed width font, but I don't see any option to compose mails using fixed width fonts (nor anything to read mails in fixed width by default) which is why I'm using the CSS trick.

Are those options hidden somewhere?

michael said...

As of Feb. 24, Google retired the fixed-width font feature from Labs: http://bit.ly/9zxgDD :-(