Please optimize styles for skinning

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
sundance
Posts: 5
Joined: 10 Jan 2009, 01:08

Please optimize styles for skinning

Post by sundance »

Hi there,

I would like to place a request and chose this forum section here because it is about customization.

I am using Mantis in several environments, in most of them I want to use different looks of Mantis (skinning). I am talking about a few icons, font and style changes. With a little effort it is of course possible to change the CSS file. But one thing is really annoying but can be pretty easily fixed.

I guess you can easily imagine that a different color theme will in most cases change the background color of the table headers.
Lets take the login page for example. The default looks like this:
Image

I want to make it look like this:
Image

As you can see, I have colored the background of the header cells. Unfortunately, besides of changing the CSS, I had to change the file login_page.php as well (And this is the case for every page in which you want to change the header cells).

Why?

The login form table has two columns. The header row code looks as follows:

Code: Select all

<tr>
   <td class="form-title">Login</td>
   <td class="right"></td>
</tr>
You can see that only the first cell is assigned a header related style called "form-title". The second cell is assigned a basic style that is not only used in header rows, thus, if you change the style of "right" it will be applied to many other cells that are not in header rows.

I changed the code to this:

Code: Select all

<tr>
   <td class="form-title">Login</td>
   <td class="form-title-right"></td>
</tr>
I also created a corresponding style in the CSS file in order to make my login page look like you can see in the screenshot above.

My request is, that all cells in header rows are assigned a "form-title-xxx" style. I am suggesting this CSS example:

Code: Select all

td.form-title { background-color: #FFB300; color: #000000; font-weight: bold; text-align: left; }
td.form-title-right { background-color: #FFB300; color: #000000; font-weight: bold; text-align: right; }
td.form-title-center { background-color: #FFB300; color: #000000; font-weight: bold; text-align: center; }
That way it will be much easier to apply a custom skin by just changing the CSS file.

Such a change is not difficult and is also not much work either. But rather than me re-doing it myself for every new release (because other code in the PHP files might have changed) it would be much more convenient if this will come with source files right away.

I hope this finds your support.

Thanks you and best regards,
Sundance
vboctor
Site Admin
Posts: 1304
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Re: Please optimize styles for skinning

Post by vboctor »

Sounds like easy enough to be done. However, my question is why not colspan="2" rather than adding this extra class?
Migrate your MantisBT to the MantisHub Cloud
Michael.S
Posts: 4
Joined: 14 Jan 2009, 09:11
Location: Germany

Re: Please optimize styles for skinning

Post by Michael.S »

colspan=2 is better than 2 cols.
as you see in the screenshot with the colored header, there is a small white line between both cols.
deboutv
Posts: 507
Joined: 15 Jan 2007, 14:31
Location: La Ciotat, FRANCE
Contact:

Re: Please optimize styles for skinning

Post by deboutv »

Michael.S wrote:colspan=2 is better than 2 cols.
as you see in the screenshot with the colored header, there is a small white line between both cols.
That could be wanted ;)
Want more plugins to customize Mantis?
=> http://deboutv.free.fr/mantis/

Mantis: 1.1.0, 1.1.0a2
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux
sundance
Posts: 5
Joined: 10 Jan 2009, 01:08

Re: Please optimize styles for skinning

Post by sundance »

Yep, spanning the header columns would be even better.
Thanks for the note.

Best regards,
Sundance
Post Reply