r104426 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104425‎ | r104426 | r104427 >
Date:13:59, 28 November 2011
Author:robin
Status:ok (Comments)
Tags:
Comment:
no need to hardcode font-weight:bold, <tr> is bold by default
Modified paths:
  • /trunk/extensions/SiteMatrix/SiteMatrix_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SiteMatrix/SiteMatrix_body.php
@@ -359,7 +359,7 @@
360360 $language = $this->getLanguage();
361361 # Total
362362 $totalCount = 0;
363 - $s .= '<tr style="font-weight: bold"><th rowspan="2"><a id="total" name="total"></a>' . wfMsgHtml( 'sitematrix-sitetotal' ) . '</th>';
 363+ $s .= '<tr><th rowspan="2"><a id="total" name="total"></a>' . wfMsgHtml( 'sitematrix-sitetotal' ) . '</th>';
364364 foreach( $matrix->getNames() as $site => $name ) {
365365 $url = $matrix->getSiteUrl( $site );
366366 $count = $matrix->getCountPerSite( $site );
@@ -369,7 +369,7 @@
370370 }
371371 $s .= '</tr>';
372372
373 - $s .= '<tr style="font-weight: bold">';
 373+ $s .= '<tr>';
374374 $noProjects = count( $matrix->getNames() );
375375 $totalCount = $language->formatNum( $totalCount );
376376 $s .= "<th colspan=\"{$noProjects }\">{$totalCount}</th>";

Comments

#Comment by Santhosh.thottingal (talk | contribs)   04:46, 5 December 2011

is not bold by default. table header is bold and center aligned in most of the browsers. I read that this is not true for all browsers, but I am not aware of any browsers which does not apply the default bold style for th. See http://w3fools.com/#html_tables

http://webdesign.about.com/od/tables/f/blfaqthvstd.htm recommends to use td instead of th if we are using th just for styling purpose and if the row is not really a header.

#Comment by SPQRobin (talk | contribs)   11:18, 5 December 2011

Yeah I know it's th, I was mistaken in the summary apparently. It is a header, and the other headers don't set font-weight: bold; either, so it's also for consistency with those.

Status & tagging log