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

Syntax Highlighting with Dark Theme #28

Open
angles-n-daemons opened this issue Aug 4, 2023 · 3 comments
Open

Syntax Highlighting with Dark Theme #28

angles-n-daemons opened this issue Aug 4, 2023 · 3 comments

Comments

@angles-n-daemons
Copy link

Hi there, I'm seeing a similar issue to #14.

I've added the recommended fix and although syntax highlighting is working now, the background color has changed in code blocks with syntax applied in a way that makes the code unreadable:

image

I should note that code blocks without a syntax specified still view fine:

image

Are there any recommendations as to how to approach this issue? I'm unfamiliar with how hugo themes work, but I'm happy to investigate further on my end.

@angles-n-daemons
Copy link
Author

For the broken section, the style is applied outside of a stylesheet:

from developer tools:

// no file
element.style {
    background-color: #fff;
    ...
}

whereas for the working section the style is applied by the stylesheet:

// (index):392
@media (prefers-color-scheme: dark)
pre, code {
    background-color: #262626;
}

@angles-n-daemons
Copy link
Author

@angles-n-daemons
Copy link
Author

Seems like removing pygmentsStyle="colorful" from the config.toml addresses this issue though I'm not sure why

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

No branches or pull requests

1 participant