Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code blocks are hard to read in dark mode #3896

Open
TraceyC77 opened this issue Oct 9, 2023 · 2 comments
Open

Code blocks are hard to read in dark mode #3896

TraceyC77 opened this issue Oct 9, 2023 · 2 comments
Labels

Comments

@TraceyC77
Copy link

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

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

@Spencer-Robertson-ANU
Copy link

Spencer-Robertson-ANU commented Oct 13, 2023

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

@shivesh96
Copy link

Add Below code

<style> #app pre > code span.hljs-string{ color: grey; } </style>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants