-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
[Dawn] Code snippets seem to be unreadable (see issue from 2022) #320
Comments
Hi @mneveroff 👋 In case you were unaware, you can use Prism to provide richer code blocks. See: https://ghost.org/tutorials/code-snippets-in-ghost/ I did a bit of digging on this issue as I'd experienced the same thing - I eventually tracked it down to a one of the vars |
Hey @georgepstaylor, well done on submitting a PR there, I came to sam e realisation but wasn't as confident in my overarching knowledge of Ghost just yet to submit the fix myself, appreciate you taking that step! Also, will definitely check out Prism, looks much better than the thing I've built with a :pre copypasting of content from codeblocks |
@mneveroff thank you for including the workaround. I find it annoying that on dark it's still a white box, but this makes it readable! Hopefully the pull request gets reviewed soon and the workaround is no longer needed. |
Continuing from #197
There seems to still be an issue as of Dawn latest release with the code snippets
I assume that the order in which the .css files are loaded is incorrect, as this is what I see in my code inspection for pre blocks on the Blogpost preview page:
It's apparent that there seem to be two variables: --primary-text-color and --color-primary-text. Whilst the latter would read well in dark mode it's not the one that gets applied. Any advise? For now I'm overriding the color property of pre HTML elements.
Installation details
Version: 5.78.0
Environment: production
Database: mysql8
Theme: dawn v1.0.0 (as per UI, but uploaded one from https://github.com/TryGhost/Dawn/archive/main.zip, but I must say that some versioning wouldn't hurt)
Workaround
Adding this snippet to page footer mitigates the issue:
The text was updated successfully, but these errors were encountered: