Wikia

Community Central

Admin Forum:Fixing wikitable sortable headers post MW 1.19

Talk0
94,796pages on
this wiki

This Forum has been archived

Forums: Admin Central Index Technical Help Fixing wikitable sortable headers post MW 1.19
Wikia's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.
Note: This topic has been unedited for 621 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.
Screen Shot 2012-09-18 at 06.25.39

An example of the odd header colouring, taken from tardis:List of Doctor Who television writers

Tables that use class=wikitable sortable used to inherit whatever properties you'd defined for class=wikitable. Now, they briefly assume those properties, but once the page fully loads, they switch to another set of values —— but oddly only for the background-color. Other values, like font color, are still controlled by the CSS declaration for .wikitable. This is causing problems at my wiki, since the background-color they finally land on is light, and the font color is white. In the picture at right, note too, that only those columns that are marked as sortable have this issue; the "notes" column, which is unsortable, is displaying as intended.

What are the new CSS selectors I need to use to get the sortable columns' backgrounds to behave? czechout@Wikia    fly tardis 16:27: Tue 18 Sep 2012

Hey CzechOut. It sounds like you are using background: color in your CSS instead of background-color: color. In MediaWiki 1.19, the sort arrows are added via background-image and using background to set the color directly can conflict with that. If I am completely off-based with this assumption, please point me in the right direction (page links). Rappy @Wikia 16:32, September 18, 2012 (UTC)
I see your issue (from the tardis link in the image). Read up on this for a 'fix'. [1]
You will have to hard-code the jQuery sortable tables and the background gradient you want to use in Common.css and !important it. What's happening is the image of the sort arrows are overriding the gradient when the JS kicks in (and makes the table sortable)... so the CSS has to maintain that both show up instead. If you have issues getting that to work, let me know and I will look into it for you. Rappy @Wikia 16:41, September 18, 2012 (UTC)

Around Wikia's network

Random Wiki