Opened 8 years ago

Closed 7 years ago

#4290 closed defect (wontfix)

Make CSS selectable

Reported by: izzy Owned by: cbalan
Priority: normal Component: MenusPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11


I think it would be a good idea to make the CSS to use selectable, so one has not to nullify existing settings before applying own ones. I just created a patch for this: it adds a new option to the [menu-custom] section of the trac.ini - menu_style. Here one can either select from the "shipped" CSS files (with my patch: 'simple' (the current one), 'superfish' (the one used previously), and 'trac' - the one I made), or define a complete URL for an own CSS file (which then is taken literally).

menu_style = superfish

For this to work, the current superfish.css file has to be split to basic.css (holding the "essential" part) and simple.css (holding the "Demo Style"). Plus from the previous superfish.css, the "Demo Style" part should be added as superfish.css. If you lost my trac.css, I'll attach it again here (wait - I'll either attach it again later, there are some modifications I need to finish).

Hope you like and apply the patch ;)

All the best, Izzy.

Attachments (2) (1.8 KB) - added by izzy 8 years ago.
Adding stylesheet selection to trac.ini
trac.css (1.5 KB) - added by izzy 8 years ago.
trac.css to make the menu looking more like the trac original

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by izzy

Adding stylesheet selection to trac.ini

Changed 8 years ago by izzy

trac.css to make the menu looking more like the trac original

comment:1 Changed 8 years ago by cbalan

  • Status changed from new to assigned

Hey Izzy,

This is great, but personally I believe that any special customizations should be done using wiki:TracInterfaceCustomization#SiteAppearance "method".

The default css shipped with this plugin should only match trac default's theme. This is the reason why [menu-custom]serve_ui_files exists, to prevent the default css to be added, if there is a custom theme in place.

I do like this idea(your patch is great) but having in mind :

  1. the wiki:TracInterfaceCustomization
  2. for a custom theme, one css file can "cover everything", including menus and other plugins (plus is easy to maintain it)
  3. having files served from /static (custom theme case) would work better than /chrome/...

I consider this approach out of scope.

Thank you, Catalin Balan

comment:2 Changed 8 years ago by cbalan

(In [5021]) MenusPlugin: - More trac-alike look thanks to Izzy. refs #4290 #4264 #4274

comment:3 Changed 7 years ago by cbalan

  • Resolution set to wontfix
  • Status changed from assigned to closed

Add Comment

Modify Ticket

as closed The owner will remain cbalan.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.