Page MenuHomePhabricator

New editor's Special:Homepage in dark mode shows inverted image in suggested-edits-card
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  1. Set Wikipedia to "light mode" via Preferences > Appearance
  2. Turn on "dark mode toggle" via Preferences > Gadgets > Dark mode toggle: Enable a toggle for using a light text on dark background color scheme
  3. Go to https://en.wikipedia.org/w/index.php?title=Special:Homepage for new editors (I think this is part of the "growth experiments" feature set?). I have attached a screenshot at the bottom of this issue.
  4. Refresh until the article under "Suggested Edits" has an image
  5. Click on the person icon in the top right of the page to open the "Personal Settings" dropdown & use the "dark mode toggle" to change the page to dark mode.
    Screenshot 2026-03-25 at 4.28.25 PM.png (752×658 px, 68 KB)
  6. Observe that the image in the .suggested-edits-card is inverted (see screenshot at the bottom of this issue)

What happens?:

Images in the suggested-edits-card on the Special:Homepage are inverted when dark mode is active. (see attached screenshot at the bottom of this bug)

What should have happened instead?:

Images should not be inverted in dark mode.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
MediaWiki: 1.46.0-wmf.20 (rMWf1911ecce45a), 18:24, 19 March 2026

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

Firefox 148.0.2

On other pages, images are not inverted in dark mode. This is because the CSS style rule which applies filter: invert(1) hue-rotate(180deg); uses the html img:not(.mw-invert) selector to ignore most images, such as those on article pages.

However, in the .suggested-edits-card on the Special:Homepage, images are placed using a CSS rule background-image instead of with an img element. Therefore, the normal selector that protects most images from inversion is not applied correctly.

My first impression is that you could add a class like .cdx-no-invert to the div with the background-image (.se-card-image) so that that element is not inverted with the rest of the page in dark mode.

Screenshot 2026-03-19 at 1.43.30 PM.png (1×2 px, 991 KB)

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Thank you, @Chao_Garden for the report! I checked Special:Homepage for the same image card. The issue doesn't seem to be reproducible. Here where I checked:

I checked on wmf.20for

  • FF 146 MacOS (Sequoia)
  • FF 146 Windows 11
  • FF 148 MacOS (Tahoe)

and to be sure I also checked it on Chrome 146 and Safari 26 (the most recent versions)- all of the above seem to display the image card correctly:

Screenshot 2026-03-25 at 6.23.31 PM.png (1×1 px, 744 KB)

@Etonkovidova thank you, I just realized I neglected to give you the full repro steps:

Crucially, I have Wikipedia set to light mode (under Preferences > Appearnce) and then I have enabled the "dark mode toggle" gadget (via Preferences > Gadgets > "Dark mode toggle: Enable a toggle for using a light text on dark background color scheme"). And then I activated dark mode via the toggle in the "Personal settings" dropdown:

Screenshot 2026-03-25 at 4.28.25 PM.png (752×658 px, 68 KB)

Are you able to reproduce the issue if you use the dark mode toggle?
(I'll update the issue description to include this info)

@Chao_Garden - thank you so much for providing more details!
Yes, now I can see the issue. Following the steps you described, all images in SE cards become inverted.

Moving to Needs discussion on the team workboard.