Page MenuHomePhabricator

Timeless cancels out value of the cellpadding attribute
Closed, ResolvedPublic

Description

This is more of a documentation task than anything, but Timeless doesn't seem to understand cellpadding. I personally don't have a problem with this behavior (it will help identify off the cuff where changes should be made to bring Wiki* into the 21st century of HTML), which is why I'm noting it as documentation, but I might reasonably suggest this will be unexpected. 🙂

There are some other rendering differences there too on Firefox 57 on Windows 10, but that one immediately jumps at you.

Event Timeline

Timeless uses Normalise (a CSS reset stylesheet) which applies a generic rule to td and th elements. See https://github.com/wikimedia/mediawiki-skins-Timeless/blob/master/resources/libraries/normalise.css#L409:

td,
th {
	padding: 0;
}

This CSS cancels out the cellpadding value as it has a higher specificity level.

SamanthaNguyen renamed this task from Timeless doesn't understand obsolete HTML (at least cellpadding) to Timeless cancels out value of the cellpadding attribute.Nov 22 2017, 6:45 PM

To be more specific.. understanding what an HTML attribute and recognizing it, is done at at the web browser level.

To be more specific.. understanding what an HTML attribute and recognizing it, is done at at the web browser level.

Assuming the attribute in question makes it through the MediaWiki whitelist, which is what was confusing to me in general.

That would be MediaWiki's parser, which decides what to output to the browser.

See also: T161423

Worth merging? The root cause is the same, even if infobox CSS is on Wiki* rather than in the skin.

Isarra added a subscriber: Isarra.

Okay fine I hate you all I'll fix this.

In contrast to the other skins, Timeless sets border-collapse: collapse and border-spacing: 0 to all tables, including all tables in the content area. The issue can be fixed by just removing these two properties, or making their selector more specific so it does not cover inboxes and such.

General note that we might want both of those things, not just the one listed here.

Also I'm kidding I love you guys.

Okay fine I hate you all I'll fix this.

Also I'm kidding I love you guys.

I don't know how to feel anymore.

Change 532285 had a related patch set uploaded (by Isarra; owner: Isarra):
[mediawiki/skins/Timeless@master] Kill weird table normalisation

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

Change 532285 merged by jenkins-bot:
[mediawiki/skins/Timeless@master] Kill weird table normalisation

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