Project

General

Profile

Actions

Feature #898

closed

add project specific css class to body tag

Added by Georg Leciejewski almost 17 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
UI
Target version:
-
Start date:
2008-03-20
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

add the projectname(like in url) as css class to the body or wrapper element. This way one could apply a different layout for each project.

I would need it to add another background image to each header, to customize the logo. But it could also be used to restyle other regions down the cascade.


Files

project_css.diff (643 Bytes) project_css.diff Rocco Stanzione, 2008-03-20 16:01
per_project_styling.patch (480 Bytes) per_project_styling.patch Bradley Whittington, 2008-07-31 12:42

Related issues

Related to Redmine - Patch #14767: More CSS classes on various fieldsClosed

Actions
Actions #1

Updated by Jos Yule almost 17 years ago

This would be nice - i've had a couple of requests to add logo's for particular projects into the header area.

Actions #2

Updated by Rocco Stanzione almost 17 years ago

+1. We don't even need a database field. The attached patch works for me, just create a public/stylesheets/<project identifier>.css.

Actions #3

Updated by Bradley Whittington over 16 years ago

This has the cost of a file_exists check for every page load, which is not ideal.

My attached patch just adds an id to the body, which has the drawback of using a single, monolithic css file for styling, but benefits from not adding file_exists checks.

Actions #4

Updated by Toshi MARUYAMA over 13 years ago

  • Category set to UI
Actions #5

Updated by Toshi MARUYAMA over 13 years ago

  • Estimated time deleted (0.50 h)
Actions #6

Updated by Mischa The Evil about 11 years ago

  • Status changed from New to Closed

This has been implemented with r12170 (#14767).

body now includes the project identifier, prepended with project-, when you are navigating a project view.
So for a project with an identifier ecookbook the CSS style would be body.project-ecookbook.

Actions #7

Updated by Mischa The Evil about 11 years ago

  • Related to Patch #14767: More CSS classes on various fields added
Actions

Also available in: Atom PDF