hirschan / Dark-Mode-Wikipedia

A Firefox extension, primarily suited for the English Wikipedia site.
https://addons.mozilla.org/firefox/addon/dark-mode-for-wikipedia/
MIT License
40 stars 8 forks source link

Syntax highlight colours shown as white #6

Closed Mounster-Chef closed 2 years ago

Mounster-Chef commented 2 years ago

The colours of the words in the code markdown get overriden to white/grey. Original highlighting: imagen When dark mode is switched on: imagen

hirschan commented 2 years ago

Thank you for your finding. I will look into it as soon as I can!

Draeggon commented 2 years ago

The problem occurs also in LaTeX, the specific scheme coloring are overwrite by the pre balise coloring

Draeggon commented 2 years ago

Removing the !important from h1, h2, h3, h4, p, th, td, div, li, input, span, i, caption, .oo-ui-labelWidget section and pre, code, .hll, tr::before section seem to fix the problem

And by the way @hirschan why where the !important added in the first place ? Had you any issue with some css not properly done ?

hirschan commented 2 years ago

Doesn't work that well when I tried @Draeggon. I mean the colors are there but the background is grey which makes it hard to read.

java colors

Also, if you check out the Python side it messes up some of the code colors. Will have to continue to try a combination where it all works.

In the README-file I have saved different wiki links you can "verify" or "test" against if you want to see that your changes works in all different cases (tables, code, picture, formulas).

hirschan commented 2 years ago

java new colors

Looks good? I will push in the coming days.

hirschan commented 2 years ago

Fixed now, pushed to master. I will update the Firefox extension soon, you can download locally, load manifest.json and check out this page: https://en.wikipedia.org/wiki/%22Hello,_World!%22_program#Examples