In a few of the Wolf themes I’ve ported, I have noticed that sometimes the “code” examples are inexplicably smaller than their context. I shrugged, and didn’t think too much more about it, although it was irksome.
Irksome … until I stumbled across a fascinating article by Eric Meyer on Fixed Monospace Sizing. The bottom line is that the CSS declaration of a monospaced font needs to include a “serif” or “sans-serif” generic declaration at the end of the definition; leaving it simply at “monospace” gets you apparent browser weirdness. (See the article for the gory details!) Something like this is what is needed, then:
font-family: Consolas, monospace, serif; font-size: 1em;
It’s worth noting, too, that Meyer stands by using “em” rather that “px” for sizing. But I reckon I should go back through my ported-to-Wolf themes and make them prettier!
This page last updated: Tue, 15 Nov 2011.