Page MenuHomePhabricator

Timeless class=wikitable hides styles on table rows
Closed, ResolvedPublic

Description

Hello,

When using the wikitable class with the Timeless skin, CSS styles applied on table rows are apparently ignored.

  • Go to https://fr.wikipedia.org/wiki/Utilisateur:Seudo/TestTableStyle, which displays 3 tables
  • If you are not using the Timeless skin on the French Wikipedia, the 1st row in each table has a green background
  • If you are using the Timeless skin, the 1st row on table 1 has no green background, while the 1st row in the Table 2 and 3 have a green background.

Only the 1st table has the "wikitable" class.

When using the Firefox inspector, I saw that the wikitable class, when using the Timeless skin, has the following rule:

.mw-datatable > tr > td, .wikitable > tr > td, .mw-datatable > * > tr > td, .wikitable > * > tr > td {
    background: 
    #f8f9fa;
}

I guess that may be the source of the problem, but I am not sure. I am using Firefox 70.0, but also saw the same behavior on other browsers such as Android/Opera.

Event Timeline

Confirm, I have the very same problem here using the latest Firefox and Chrome, and it is very annoying.

This was probably introduced by T220232 in August this year, thus I call @Isarra to have another look at their patch.

Note that the same is true when adding a style on the whole table (in addition to the "wikitable" class").

Change 572408 had a related patch set uploaded (by Aron Manning; owner: Aron Manning):
[mediawiki/skins/Timeless@master] Move up background: rule from table cells to table rows to enable row background-color overrides in wikitext

https://gerrit.wikimedia.org/r/572408

Note that the same is true when adding a style on the whole table (in addition to the "wikitable" class").

The second patch fixes this also.

Change 572408 merged by jenkins-bot:
[mediawiki/skins/Timeless@master] Remove background: rule from table cells to enable row background-color overrides in wikitext.

https://gerrit.wikimedia.org/r/572408