r98069 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98068‎ | r98069 | r98070 >
Date:17:26, 25 September 2011
Author:hartman
Status:resolved (Comments)
Tags:
Comment:
Raise the specificity of the sortable header.
Many installations have something like: table.wikitable th {background:color;} which would override the background of the sortable header.
Modified paths:
  • /trunk/phase3/skins/common/shared.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/shared.css
@@ -925,17 +925,17 @@
926926 background-position: 0% 100%;
927927 }
928928 /* Table Sorting */
929 -th.headerSort {
 929+table.sortable th.headerSort {
930930 background-image: url(images/sort_both.gif);
931931 cursor: pointer;
932932 background-repeat: no-repeat;
933933 background-position: center right;
934934 padding-right: 21px;
935935 }
936 -th.headerSortUp {
 936+table.sortable th.headerSortUp {
937937 background-image: url(images/sort_up.gif);
938938 }
939 -th.headerSortDown {
 939+table.sortable th.headerSortDown {
940940 background-image: url(images/sort_down.gif);
941941 }
942942

Follow-up revisions

RevisionCommit summaryAuthorDate
r98665Add the class jquery-tablesorter to all tables that are made sortable....hartman11:08, 2 October 2011
r100746REL1_18 MFT r97815, r98069, r98210, r98212, 98298reedy21:33, 25 October 2011

Comments

#Comment by Krinkle (talk | contribs)   21:42, 25 September 2011

The jquery.tablesorter plugin is in no way limited to tables with a class of "sortable". It can be called on any jQuery collection and it will use all table elements of it.

#Comment by TheDJ (talk | contribs)   16:28, 29 September 2011

Not having it, makes it almost impossible to set a proper padding on a th element.... We need to find a solution for this.

#Comment by TheDJ (talk | contribs)   16:29, 29 September 2011
#Comment by Krinkle (talk | contribs)   21:58, 29 September 2011

I'd say let the plugin add a classname on tables it touches and use that :)

table.jquery-tablesorter th.headerSort { .. } (and while at it, move this styling to a .css file related to the module)

#Comment by TheDJ (talk | contribs)   11:08, 2 October 2011

Done in r98665

Status & tagging log