views:

4477

answers:

6

I am using Doxygen to generate HTML documentation from my code. However I find that default stylesheet has quite poor choice of fonts and layout. I know I can write my own CSS file to get exactly the output I want, but before I spend my time on it, I am wondering if there are any decent custom stylesheets already available.

+1  A: 

A simple Google search yielded no results at all. Given that Doxygen comes with just a single default style, I'd say that the answer to your question is: No :)

There might be stylesheets out there that you like which people might be willing to share, but you're going to have to browse/search for them yourself.

Either that, or create your own. Cheers!

OJ
+1  A: 

Here's one:

http://trac-hacks.org/ticket/771

Lou Franco
+3  A: 

I don't have a big problem with the default styles, EXCEPT that the base font size is fixed to 12pt (a recent change). Which means it will never be the right size and cannot be dynamically adjusted.

Below are some trivial changes I put into the default on my machine. Mostly I changed the hard-coded font sizes to named or relative sizes so that Ctrl-Mousewheel easily adjusts the size. Similarly, I also changed (not shown here) other sizes from (for instance) 11pt to 92% (based on original 12pt value).

I also added in code, tt, and pre as they looked a trifle strange to me.

Clearly nobody's CSS will be fully acceptable to somebody else. The best you can hope for is some kind of uniformity, usability and as little bloodshed as possible...

body, table, div, p, dl {
font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
    font-size: medium;
}

/* Ensure that <CODE> and <TT> text is as big as the <BODY> text and use a nicer font */
code, tt { 
    font-family: Consolas, Courier, monospace;
    font-size: medium;
}

/* Need this as <PRE> makes the text look smaller due to different font */
pre {
    font-size: 105%;
}
Harold Bamford
i would upvote this if these changes would go into Doxygen directly instead of staying on your machine.
ax
@ax -- I have sent this to the owner of Doxygen, but that is really all I can do. What would you suggest?
Harold Bamford
+5  A: 

Not sure if you've found an answer on this now-stale question, but I wanted to point out that Doxygen 1.5.7 (released about a week before this question was written) included some CSS changes that I submitted, so it should be a little cleaner. (It didn't requite that much tweaking — it seemed to already be in pretty decent shape.) If you are (were?) using an older version of Doxygen, the updated doxygen.css should still work fine with most older versions, since I don't think the structure of the HTML output has changed appreciably in the recent past.

Quinn Taylor
+1 for actually doing something to improve the situation. if you would do some more ("i didn't spend a huge amount of time tweaking it"), i would upvote you again :)
ax
+7  A: 

I've made some basic modifications to the Doxygen CSS to clean it up a little. I've uploaded it to bitbucket.org/rc1/doxygen-style/

Ross
Hey, Ross, wow a lot cleaner. I'm trying this via Firefox 3.5.7 now and get a styling problem with the Class Members section. But other than that, looks sharp.
happyappa
thanks for letting me know. will look into it and get back to you...
Ross
Ross
I suppose it was worth waiting a little bit to get the right answer. ;)
Alex B
A: 

When creating CHM files the default "tabs.css" was found having #fff defined at couple of places. Should replace with something visible, e.g. #00bfff (DeepSkyBlue as at http://www.w3schools.com/css/css_colornames.asp).

Vasily