#1714 closed enhancement (fixed)
Use wiki page to provide global CSS rules
| Reported by: | Owned by: | Martin Scharrer | |
|---|---|---|---|
| Priority: | normal | Component: | Request-a-Hack |
| Severity: | normal | Keywords: | wiki css |
| Cc: | Trac Release: | 0.11 |
Description
I patched my trac install to supply a conversion from text/x-trac-wiki to text/css, so I can use a certain wiki page ("SiteStyle?") to give my wiki authors direct control over the site CSS (linked from the templates via <link rel="stylesheet" href="/proj/wiki/SiteStyle?format=css" type="text/css" />).
The Trac developers suggested this should be made an extension instead of a core feature (see http://trac.edgewall.org/ticket/5639), but I don't know how to hook a plugin into the respective code or where to start learning. It would be great if someone could pick this up! Perhaps even the aforementioned link element could be inserted by the plugin automatically.
Attachments (0)
Change History (3)
comment:1 Changed 17 years ago by
comment:2 Changed 17 years ago by
| Owner: | changed from anybody to Martin Scharrer |
|---|---|
| Status: | new → assigned |
comment:3 Changed 17 years ago by
| Keywords: | wiki css added |
|---|---|
| Resolution: | → fixed |
| Status: | assigned → closed |
| Trac Release: | 0.10 → 0.11 |
I implemented this now as described in comment:1 as WikiCssPlugin.



Have a look at my new AddHeadersPlugin which can be used (with trac 0.11 or later) to add the needed
linktag. I tested this with Firefox 3 under Ubuntu Hardy today and Firebug (a firefox plug-in for web devlopers) tells me that there were no CSS rules found, probably because it is still sent out astext/plainnottext/css. This can be fixed e.g. by writing a request provider plug-in.Would the following be sufficient for you?:
trac.iniconfiguration file one (or maybe more) special wiki pages which are used for CSS./project/wikicss.cssastext/cssusable for browsers.linktag so this CSS file is used when browsing trac.