Page MenuHomePhabricator

skin-invert-image needs a black background
Open, LowPublic2 Estimated Story PointsBUG REPORT

Description

Follow up work to T365102
Steps to replicate the issue (include links if applicable):

What happens?:

  • Has a white/gray background

Screenshot 2024-06-14 at 11.09.49 AM.png (317×316 px, 23 KB)

What should have happened instead?:

Screenshot 2024-06-14 at 11.09.34 AM.png (316×340 px, 24 KB)

  • Should have black background

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

  • We need to set background: white; to .skin-invert-image img

Event Timeline

Background is already set on the outer <figure>-element:

figure[typeof~='mw:File/Thumb'],
figure[typeof~='mw:File/Frame'] {
 border:var(--border-subtle,1px solid #c8ccd1);
 border-bottom:0;
 background-color:var(--background-color-interactive-subtle,#f8f9fa);
}

I don't see any reason why the same background is set again on the <img>:

figure[typeof~="mw:File/Thumb"] > :not(figcaption) .mw-file-element, 
figure[typeof~="mw:File/Frame"] > :not(figcaption) .mw-file-element {
	[...]
	background: var(--background-color-interactive-subtle,#f8f9fa);
}

Removing that line would solve this issue, as .skin-invert-image won't invert anything that is defined outside the <img>.

(Code according to Firefox DevTools; don't know where to find it in the repo.)

bwang triaged this task as Low priority.Mon, Jun 17, 5:49 PM
bwang set the point value for this task to 2.
Sjoerddebruin renamed this task from skin-invert-image needs a white background to skin-invert-image needs a black background.Sun, Jun 23, 10:08 AM
Sjoerddebruin subscribed.

It works fine with Minerva, this problem only concerns Vector 2022

Do you have an estimate of when this will be resolved? Given the imminent night mode, onwiki documentation needs to be drawn up for contributors. It would be useful to have the class up and running to explain how it works.