making javadoc more legible

Let's face it: javadoc output looks ugly. At least to me. The poor use of colour, inconsistent font styles, bad typographical hierarchy and too much visual clutter makes it quite illegible and unreadable. So I redesigned the Java API documentation stylesheet to clean it up and make it more readable and useful in its function as a reference.

I did it using the following principles:

MAKE CODE ELEMENTS VISIBLE WHEN PRESENT AMIDST NORMAL TEXT

javadoc-restyle-1



FOCUS ON THE TEXT, NOT THE TABLE TRAPPINGS



WHEN IN TEXT FOCUS ON TEXT. WHEN IN CODE, FOCUS ON CODE



CLEARLY DISTINGUISH INTERFACES FROM CLASSES

and

HIGHLIGHT HISTORY (FOCUS ON WHAT YOU REFER TO REPEATEDLY)

I figured other java coders maybe interested in giving their eyes a break, so here is the stylesheet, set free to the world. Simply download and replace the existing file in the doc/api folder of any javadoc API documentation.

NOTE: this may break over time. Since javadoc does not generate proper CSS, and uses "font" and "background" attributes for styling, the modified stylesheet contains quite a few poor styling rules. Should javadoc introduce semantically meaningful CSS, this will become much easier. As it stands, the styles used here are not sexy, but they do improve the appearance. (Try as I might, I could only find one other redesigned stylesheet for javadoc. Perhaps API reference legibility isn't as important as I think it is.)

I also sanitised the fonts used, reducing them to one for text and one for code. The default code font is Courier, which works really badly here when mixed with sans-serif text. This has been replaced by a cascade of font faces with Consolas as the preferred, going through some popular truetype monospaced fonts, and ending with an unhinted Linux font. Reorder as you prefer.

linking here