framework icon indicating copy to clipboard operation
framework copied to clipboard

Code blocks are hard to read in dark mode

Open TraceyC77 opened this issue 1 year ago • 2 comments

Current Behavior

When reading a post on Flarum in dark mode, code blocks are difficult to read.

Steps to Reproduce

Go to https://discuss.getsol.us/d/9761-firefox-glib-gobject-critical-errors-clutter-log Switch to dark mode.

Expected Behavior

Dark mode uses an appropriate style to make text readable in code blocks.

Screenshots

flarum_code_block_dark_mode

Environment

  • Website URL: https://discuss.getsol.us/
  • Browser: Problem seen with Firefox 118.0.1, Vivaldi-stable 6.2.3105.54

I don't have access to the Flarum server instance to answer the rest of the questions. Given that this is a theming issue, it seems unnecessary anyway.

Output of php flarum info

N/A

Possible Solution

No response

Additional Context

I found this reported on the Flarum forums here: https://discuss.flarum.org/d/30696-code-blocks-have-hard-to-read-colors-in-dark-mode

From the response, it sounded like it would be possible for Flarum to pass a different theme for dark mode vs. light mode. I searched this tracker but didn't see that an issue was ever opened for it.

Workarounds:

  • View the post in light mode
  • Use the nuTensor addon (or a similar addon) to block javascript from jsdelivr.net This is what the post looks like with that js blocked:

flarum_code_block_vivaldi

TraceyC77 avatar Oct 09 '23 02:10 TraceyC77

Hi there, I'd like to fix this, can I please be assigned? Thankyou

Spencer-Robertson-ANU avatar Oct 13 '23 12:10 Spencer-Robertson-ANU

Add Below code

shivesh96 avatar Nov 01 '23 16:11 shivesh96