Hello,
I thought that since the introduction of the new themes system in Moodle 1.5 no hard-coded formatting should subsist anywhere in any of Moodle's php files. In fact, there is still a fair amount of <font>, <bold> etc. tags hard-coded in the php files, which get in the way of proper theme css customizing.
I'll take as an example a few lines from moodle/theme/index.php which have been recently fixed to now read like this:
if (isset($THEME->sheets)) {
echo '<p style="font-size:1.5em;font-weight:bold;">'.$theme.'</p>';
} else {
echo '<p style="font-size:1.5em;font-style:bold;color:red;">'.$theme.' (Moodle 1.4)</p>';
}
If a default Moodle theme had the following styles:
.warning {color:#FF0000}
.largefont { font-size:large; /* OR font-size:110% OR font-size:1.2em *depending on your css font-size system/;}
em {font-style:italic}
strong {font-weight:bold}
then the lines from moodle/theme/index.php above could be replaced with:
if (isset($THEME->sheets)) {
echo '<p class="largerfont"><strong>'.$theme.'</strong></p>';
} else {
echo '<p class="warning largerfont">'.$theme.' (Moodle 1.4)<strong></p>';
}
with the result that the final output display would be able to be controlled from a theme's css file(s).
When I developed my own theme, there were scores of instances where I came across hard-coded style left-over in the php files, which IMHO should no longer be there.
Is there anyone in charge of cleaning up all these unwanted hard-coded styles in forthcoming version 1.6?
Thanks,
Joseph