Edgewall Software

Version 5 (modified by mpotter@…, 12 years ago) ( diff )

Added reference to how to enable a project site.css.

Interface Customization using site/style.css

This page intends to collect useful snippets for including in a project style.css file. Any snippet below is intended to be included inside the style.css that was referenced from the site.html file. Typically these are used to differentiate one Trac installation from another. See Trac Interface Customization for information on enabling a site.css.

Get the "Red" Out

The theme of a the basic Trac installation is Red and Black on White. To change most of the Red (#b00) used in Trac to some other color, in this example Blue (#00b):

:link, :visited, dt em, .milestone .info h2 em,
#content.build h2.config :link, #content.build h2.config :visited,
.plugin h3 a {
 color: #00b;

This will change most of the Red in Trac and in Bitten. However some additional plugins may still use Red were it would be desired to use the new theme color.

Change The Citation Colors

The above section gets all of the Red used in Trac except the color used in the first level of the citation (>) markup.

More Example.

However this is actually the first of a series of four colors.

First level

Second level

Third level

Fourth level

And levels above.

To changes these colors away from the defaults of dark-red #b44, dark-blue #4b4, dark-green #44b, and medium-red #c55, in this example to dark-blue #44b, dark-red #b44, dark-green #4b4, and dark-blue #44b:

blockquote.citation { border-color: #44b; }
.citation blockquote.citation { border-color: #b44; }
.citation .citation blockquote.citation { border-color: #4b4; }
.citation .citation .citation blockquote.citation { border-color: #44b; }

Adding Background Color to the Main Navigation Bar

The main navigation bar (Wiki, Timeline, Roadmap, Browse Source, View Tickets, New Tickets, Search) appears in black on white. To change the background color, in this example to a pale blue:

#mainnav li {
 background-color: #eef;
Note: See TracWiki for help on using the wiki.