Alternatives CSS stylesheets

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
olea
Posts: 1
Joined: 02 Feb 2008, 14:15

Alternatives CSS stylesheets

Post by olea »

Does anybody knows about a prettyer CSS stylesheet for Mantis?

Default.css looks so 90's.

Strangely seems nobody did that before :-m
vboctor
Site Admin
Posts: 1293
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Re: Alternatives CSS stylesheets

Post by vboctor »

I am not aware of a prettier one. We haven't been getting a lot of help with the cosmetic side. Help is most welcome in this area.
Migrate your MantisBT to the MantisHub Cloud
PDDave
Posts: 4
Joined: 02 Apr 2008, 08:53

Re: Alternatives CSS stylesheets

Post by PDDave »

Hi Guys,

I may be in a position to help with cosmetic side of things as this could be a key requirement for my employer to adopt the system. I cannot promise anything as no final decision has been made yet and even at that my skills are fairly poor but it would be nice to have someone who knows much more about Mantis, PHP and CSS to bounce questions off.

Dave
SneakyWho_am_i
Posts: 13
Joined: 14 May 2008, 01:20

Re: Alternatives CSS stylesheets

Post by SneakyWho_am_i »

lol. i just finished playing with mine. My stylesheet is UGLY (I have very high contrast, large fonts, lots of inverted colours, a red-eyed mantis...) and it's full of all kinds of CSS3 weirdness so it's probably not worth posting here but here are my suggestions:

1) standardize everything before you write the stylesheet. One thing I love about mantis (and it is a small thing but it makes a big difference) is that like most professional products, I didn't have to hack it to change the colour of the textboxes. I have this pet hate where web designers think it's funny to specify black text without setting a background colour. Way to go geniuses, black on black, yeah sure, very readable. Same thing goes when they specify a white background and forget to set out a colour for the foreground. some huge projects are guilty of this, so the fact that you guys are not is very cool. I have learned to start my stylesheets with sweeping declarations like this so I don't get caught out:

Code: Select all

* { background: black; color: white; } 
This "setting a default" is not only the way for least surprise, but it will also prevent absent minded professors from accidentally creating invisible text - and possibly enhance Mantis's reputation?

2) Never, never never never never never use any of these elements or attributes ever (well, not if you can help it):
- width
- font
- bgcolor (GRRR)
- border
even stay away from 'style="blah:blee;"' because it's just too specific and it will hurt stylesheet-people (especially if they are silyl enough to write code for IE6, or if their boss is demanding IE7-friendly code... because IE just doesn't give us a sane way to change these things)

bgcolor is terrible. Because I have no love for virus explorer users, I settled for something like this:

Code: Select all

*[bgcolor="#ffffb0"], *[bgcolor="#ffffb0"] *  {background-color: #ffffb0; color:black}
*[bgcolor="#ffa0a0"], *[bgcolor="#ffa0a0"] *  {background-color: #ffa0a0; color:black}
*[bgcolor="#cceedd"], *[bgcolor="#cceedd"] *  {background-color: #cceedd; color:black}
*[bgcolor="#c8c8ff"], *[bgcolor="#c8c8ff"] *  {background-color: #c8c8ff; color:black}

*[bgcolor="#ff50a8"], *[bgcolor="#ff50a8"] *  {background-color: #ff50a8; color:black}
*[bgcolor="#ffd850"], *[bgcolor="#ffd850"] *  {background-color: #ffd850; color:black}
*[bgcolor="#e8e8e8"], *[bgcolor="#e8e8e8"] *  {background-color: #e8e8e8; color:black}
Without that I found I had munched the table cells in the "view bugs" screen or whatever it was called. It won't work in IE because it uses selectors from w3c recommendations or something, probably not part of any standard yet (although if you have no Windows users, you're ok, because the other browsers seem to support it)
The point is, bgcolor is harmful when you're trying to make a stylesheet ;)

This is all my opinion only. Others may disagree with me, fight me, etc. Cool :D I'm only human.
I hope it helped at all. I only spent a few minutes on it because the CSS for mantis is overall rather well thought out really.
Post Reply