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

Seudo created this task.Nov 16 2019, 10:29 PM

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").

Izno moved this task from Backlog to Change CSS on the CSS board.Jan 2 2020, 4:18 PM

Same thing is happening with the Statistics table in the stewards election page.
The table color and styles are hidden on timeless. https://meta.wikimedia.org/wiki/Stewards/Elections_2020/Statistics?useskin=timeless https://meta.wikimedia.org/wiki/Stewards/Elections_2020/Statistics?useskin=vector

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

Demian added a subscriber: Demian.Feb 15 2020, 12:56 PM

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.

Demian claimed this task.Feb 17 2020, 12:59 PM

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

matmarex closed this task as Resolved.Feb 19 2020, 9:58 PM
Seudo added a comment.Feb 28 2020, 8:37 AM

It works now. Thanks!