Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Off-topic question: I’m using the iOS browser extension Noir, which adds dark-mode support to web sites that don’t support dark mode by themselves. However, this causes MathJax(?) formulas like in the article to be displayed black on black. Does anyone know of a similar browser extension that can handle this? (And yes, I already reported this issue to Noir some time ago.)


The Dark Reader extension with Firefox has the same problem.


I believe the SVG file has a transparent background, but the img tag has style="background-color:white". Some browsers honor the background-color setting and show a white background behind the equations, even in dark mode. Some do not, and so the equations appear as black-on-black.

It would be better if I altered the SVG image itself to set the background color, but I don't know how to do that. Suggestions are welcome.


Displaying black on white in dark mode is still bad. In principle, CSS invert() should be able to do the trick for SVGs. You’d have to test it on all relevant browsers though.


Not even that, you should just use currentColor rather than black in SVGs.


Depends on whether you have control over the SVG contents or not.


Why would you not have control over the markup of your own website?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: