Fix bad syntax highlighting color schemes (#630)

Some pygment color schemes (like `bw`, which we use as default in the
exampleSite) do not set a foreground color explicitly, which makes those
themes look bad/illegible when using the dark mode of hugo-coder. Most
such themes are light themes (it seems after a quick research), which
explains this phenomenon.

This commit adds a fix for such color schemes by setting the default
foreground color to the one used in the light hugo-coder colorscheme.
It is overridden by proper syntax highlighting schemes.
This commit is contained in:
Alphonse Mariya
2021-12-16 22:37:12 +01:00
committed by GitHub
parent 263be7cebc
commit 29a7a942b7
5 changed files with 79 additions and 4 deletions

View File

@@ -38,6 +38,13 @@
color: $fg-color-dark;
}
// fix color schemes which do not explicitly set fg-color
.highlight {
pre {
color: $fg-color;
}
}
pre {
code {
background-color: inherit;