While toying with the templates I thought it may be time to remove a bunch of wrapper DIVS from the files.. This is just an example (Template is mail_queue):
It's currently structured:
function template_mail_queue()
{
global $context, $txt;
echo '
<div id="manage_mail">
<div id="mailqueue_stats">
<div class="cat_bar">
<h3 class="catbg">', $txt['mailqueue_stats'], '</h3>
</div>
<div class="windowbg">
<div class="content">
<dl class="settings">
<dt><strong>', $txt['mailqueue_size'], '</strong></dt>
<dd>', $context['mail_queue_size'], '</dd>
<dt><strong>', $txt['mailqueue_oldest'], '</strong></dt>
<dd>', $context['oldest_mail'], '</dd>
</dl>
</div>
</div>
</div>';
template_show_list('mail_queue');
echo '
</div>';
}
I'd rewrite it to use the following structure:
function template_mail_queue()
{
global $context, $txt;
echo '
<div id="manage_mail">
<h3 id="mailqueue_stats" class="admin_header">', $txt['mailqueue_stats'], '</h3>
<div class="admin_content">
<dl id="mailqueue_settings" class="settings">
<dt>', $txt['mailqueue_size'], '</dt>
<dd>', $context['mail_queue_size'], '</dd>
<dt>', $txt['mailqueue_oldest'], '</dt>
<dd>', $context['oldest_mail'], '</dd>
</dl>
</div>
';
template_show_list('mail_queue');
echo '
</div>';
}
With HTML5 and CSS3 (border-radius, multiple background images and all the other nice little helpers) there's IMO no need for the additional containers. I think many of them are just remnants from the old Curve (rounded corners needed a wrapper DIV/SPAN)
Note: I renamed some CSS classes, simply because their current names ("cat_bar", ""windowbg" ) don't make any sense to me
Benefits:
- Faster rendering (less code in HTML and CSS)
- Better readability
- easier for themers
Before I get on this I'd appreciate some feedback, especially from the theming guys (and girls)?
Bloc, Antechinus?