Page MenuHomePhabricator

Image based math symbols show with white background in dark mode
Open, LowPublic

Description

These symbols are not true math symbols as supported by our Math extension, but use templates like https://en.wikipedia.org/wiki/Template:Intorient to generate SVG images for the symbols instead.

Broken_Intorient.png (1×720 px, 110 KB)

Event Timeline

JMinor moved this task from Needs Triage to Bug Backlog on the Wikipedia-iOS-App-Backlog board.

The easiest solution which wouldn't have to be hardcoded for certain images would be to have the app's dark mode invert any image whose alt parameter begins with a "\". There should be almost no non-symbol images whose alt text would begin with a backslash.

Change 713814 had a related patch set uploaded (by Vadim Kovalenko; author: Vadim Kovalenko):

[mediawiki/services/mobileapps@master] Display issues with math articles in dark & black mode

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

@Ahecht a better solution would be to establish a common class for these templates that will be addressed by PCS (Page Content Service). How can we start a thread about adding a class to these templates? My proposal would be something like mw-template-math-image. I would avoid existing classes at first because of possible side effects, but maybe we can take advantage of some classes already being used by Math.

And in the templates, for example in Oiint, we would add the class to the file, like this:

... [[File:OiiintLaTeX.svg|x44px|alt=\oiiint|class=mw-template-math-image|link=]] ...

Then, we need to add the CSS rule for the new class, like this.

cc/ @vadim-kovalenko, @ssastry, @Jdlrobson and @Elitre (to give an opinion about this approach on requesting Templates changes to the community)

Related: T129054

This makes me wonder if a generic fix in the Math extension is warranted.