code blocks have a list of fixed width fonts specified in the style sheet, and I'd like them to just be
monospace instead. I know I can override it with stylish on firefox to use Droid Sans Mono, but I think it would be better if the font choice wasn't enforced in the first place.
We can't use
font-family: monospace due to massive, hairy bugs in Safari / Chrome / WebKit regarding them. Although these bugs are of the "this is how we interpret the spec" type, it's worth pointing out that no other popular browser interprets them this way.*
The moral of the story: be wary of tt, pre and font-family: monospace.
If you want it fixed, file bugs against WebKit. There is no way I'm willingly going back to that particular
font-family: monospace hell.
Edit: thanks to Ludwig's answer, we now have a valid workaround! Thank you!
* I call this "Opera Syndrome".
There is a simple proven solution and Eric Meyer has an excellent article about it. The solution is not new (Wikipedia deployed it in December 2009) and Eric has done incredible work in verifying it.
While I can absolutely sympathize with Jeff when he says he's not willingly to go back to the
font-family: monospace hell I still think this solution should also be deployed on SO and sisters.
My proposed fix is:
font-family:Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace, serif;