Page MenuHomePhabricator

Backgrounds of framed images should be white, not grey
Closed, ResolvedPublic

Description

Currently the background of all framed images is grey (which is only visible for transparent images). On English Wikipedia this is overridden in MediaWiki:Common.css to make it white, but this isn't the case on other wikis.

English Wikipedia:

Screen Shot 2016-12-23 at 10.02.00 PM.png (230×281 px, 33 KB)

Spanish Wikipedia:

Screen Shot 2016-12-23 at 10.02.21 PM.png (234×288 px, 35 KB)

The CSS used on English Wikipedia is:

div.thumb .thumbimage {
    background-color: #fff;
}

Something similar to this should probably be added to the html .thumbimage rule in /resources/src/mediawiki.skinning/content.css.

Event Timeline

Change 329029 had a related patch set uploaded (by Kaldari):
Adding white background color to thumbimages (i.e. framed images)

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

matmarex assigned this task to kaldari.
matmarex subscribed.

Change 329029 merged by jenkins-bot:
Adding white background color to thumbimages (i.e. framed images)

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

Now that the patch is merged, the custom CSS on English Wikipedia should be removed on January 6 or later.

This should be applied to Parsoid styles as well

Change 339402 had a related patch set uploaded (by Esanders):
Follow-up I96d2225: Adding white background color to framed images in Parsoid

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

Change 339402 merged by jenkins-bot:
Follow-up I96d2225: Adding white background color to framed images in Parsoid

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

MikhailRyazanov subscribed.

This change has been broken by some further edits, see https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)/Archive_218#Thumbnail_background for some history and examples. I would suggest to make the background white again. Even in the dark mode (then class=skin-invert/skin-invert-image will make it black for automatically color-inverted images to maintain good contrast and consistency with the page background).

Please also make sure that it works for all thumbnails/framed figures, since currently those wrapped in divs and tables don't seem to have any background at all (see the "In {{stack}}" example in the link above).

@MikhailRyazanov Thanks for the bug report. People don't usually watch old bug reports, so I filed this as a new bug to increase the chances of getting it fixed: T387543: Re-evaluate background colors of thumbnails and their captions. Let's keep this one closed, since this feature was implemented back in 2017, but somehow it broke years later.