ribice / kiss

Stupidly simple Hugo blogging theme
https://themes.gohugo.io/theme/kiss/
MIT License
295 stars 130 forks source link

fixed the syntax highlighting done by chroma #79

Closed ghost closed 4 years ago

ghost commented 4 years ago

the default style.css file in the kiss theme file didn't differentiate between code with and without syntax highlighting. as a result, using the Chroma syntax highlighter doesn't inherit the foreground and background color of the chosen theme.

the <code> element generated by Chroma has an attribute called data-lang whose value is the programming language being highlighted. we can use data-lang in a CSS selector to make Chroma generated <code> inherit the background and foreground color from the theme being used.

ghost commented 4 years ago

for reference, here is a screenshot before the pull request commit before and here is a screenshot after the pull request commit after

ribice commented 4 years ago

Looks great. Does this resolve #66 or #61?

ghost commented 4 years ago

I think it fixes #66, not #61. If I understood correctly, the creator of issue #61 is asking for the font size of the syntax highlighted code to be the same as non-syntax highlighted code.