View Issue Details

IDProjectCategoryView StatusLast Update
0020180mantisbtotherpublic2015-10-18 10:11
ReporterDatLicht Assigned Toatrol  
PrioritynormalSeveritytweakReproducibilityhave not tried
Status closedResolutionno change required 
Platformnot relevantOSnot relevantOS Versionnot relevant
Product Version1.2.19 
Summary0020180: hard-coded styles makes custom designs really hard
Description

When trying to make custom styles/skins, this is a hard job when trying NOT to touch the PHP code.

I see two major reasons for this:

  1. Unique CSS classes (i.e. "FooterBox" for the footer) are used too rarely.
    Example:
    Only one of endless examples is the footer element. Why not giving it an own class? Or the element above the menu containing the user name and project select box?

Result:
This makes it hard or ambigious to 'address' elements thru stylesheets.

  1. Styles are hard-coded very often.

Examples:
login_page.php: <font color="red"> ... </font>
my_view_page.php: bgcolor="#fcbdbd"

These elements and attributes are not just deprecated but also make a customization of the design a hard job.

Also, inline styles like style="..." are bad to customize if you don't want to bang with the 'big css hammer' (!important).

The problem about this is that if you touch the PHP code, no more upgrading is possible without destroying the customization.

Steps To Reproduce

see the description

Additional Information

Better would be to do all coloring, styling, etc. thru CSS.

Solution idea for i.e. the error messages:

 &lt;font color=&quot;red&quot;>error message here...&lt;/font>

could perfectly be replaced with

 &lt;span class=&quot;error&quot;>error message here&lt;/span>

and - of course - a matching style in the css:

 .error { color: red; }

Even <b>, <strong>, <i>, <u>, etc. could easily be replaced with CSS styles without any function loss.

TagsNo tags attached.

Activities

DatLicht

DatLicht

2015-10-07 07:37

reporter   ~0051606

I see, the last line has been filtered. I mean the B, STRONG, I and U Tags.

atrol

atrol

2015-10-07 07:58

developer   ~0051607

There are a lot of changes concerning this topic in next version.
Maybe you want to have a look at a nightly build of version 1.3.x [1] and/or the code of the master branch in our repository [2]

[1] https://www.mantisbt.org/builds.php
[2] https://github.com/mantisbt/mantisbt

DatLicht

DatLicht

2015-10-07 08:51

reporter   ~0051608

Wow, respect!

Even if no 'native' skin support is there yet, this is a good solution.
I think, this ticket can be closed.

atrol

atrol

2015-10-07 09:04

developer   ~0051609

this is a hard job when trying NOT to touch the PHP code.

Not too hard, e.g. check this plugin that works also with version 1.2.x
https://github.com/mantisbt-plugins/MantisBT-Colorized