Adding CSS rules for you theme¶
When a non-default Redmine theme is used, you can experience different kinds of issues with this plugin... Thus, till support for theming was added to it, the plugin had issues:
- The plugin adds the Adevertisements menu item to the top menu. In the Classic theme all such menu items have an icon...
The Advertisements menu item did not have it.
- The list of advertisements includes previews. In the Red-Andy headings on the sidebar have a different background color...
Therefore, “previews” looked different, not as on the sidebar.
So the support for theming was added to make fixing such issues easier.
Redmine themes are pure CSS customisations, which should be specified in CSS files located under the
public/themes directory. Theme files are required to be under a single directory here, the name of which is used as the name of the theme.
$ ls -l public/themes -rw-r--r-- 1 root root 30 Jun 18 2012 README drwxr-xr-x 3 root root 4096 Jun 24 14:13 alternate drwxr-xr-x 4 root root 4096 Jun 24 14:13 classic drwxr-xr-x 1 root root 4096 Aug 7 12:17 red-andy
The plugin can load additional CSS rules for a particular theme. Such CSS rules must be specified in a single file, named after the theme name (i.e., equal to the theme’s directory name) and with the extension
.css. This file must be located under the plugin’s
Thus, the plugin comes with:
$ ls -l assets/stylesheets -rw-r--r-- 1 s-andy s-andy 852 Aug 18 15:11 advertisement.css -rw-r--r-- 1 s-andy s-andy 256 Aug 18 15:11 classic.css -rw-r--r-- 1 s-andy s-andy 464 Aug 18 16:26 red-andy.css
I did shared this plugin with you and other users, so you please share your theme fixes with me and others too! You can use the Theme tracker for this...