frjo / hugo-theme-zen

A fast and clean Hugo base theme with css-grid and Hugo pipes support.
https://zen-demo.xdeb.org/
GNU General Public License v2.0
264 stars 75 forks source link

Problem with syntax highlighting #90

Closed ummels closed 1 year ago

ummels commented 1 year ago

Hi,

when formatting a code block with Hugo's standard syntax highlighting, some of the code is barely readable due to the foreground colour being too dark.

Example blog post demonstrating the issue

I guess, the issue stems from the fact that _reset.scss sets the foreground colour for code elements, but Hugo's syntax highlighting sets the foreground color on the surrounding pre element.

frjo commented 1 year ago

Thanks for reporting this issue!

I have attempted a fix in commit 79ad438.

Setting colour should never have been in "reset". Now moved to "base" and I avoid setting colour on code with syntax highlighting by using "code:not([data-lang])".

Please report back if this fixes your issue.

ummels commented 1 year ago

Thanks al lot! This fixes the issue indeed.