Syntax highlighting in Safari doesn't work?

I’m trying to use syntax highlighting in code blocks, and it looks great in Firefox, but in Safari, after a brief moment during initial page load when I can see the colors for maybe like 1/60th of a second, the <pre> code turns white, it seems through a user agent stylesheet?

I found this related issue: Syntax highlight: background is affected, but no colors otherwise

However, that issue was closed and there was never any indication if this can be fixed for Safari, or if I’m doomed to white text for code forever on that browser.

See related GitHub discussion: Migrate to Hugo · Issue #158 · geerlingguy/jeffgeerling-com · GitHub

1 Like

If you’re using 1Password, may be due to the current issue with its browser extension:

(P.S.: Big fan of your content, sir!)

1 Like

@geerlingguy I had exactly the same issue. Syntax would show for a sliver of a moment, and then gone. Back then, I turned off and then on all the extensions, and that fixed it.

Later, I saw the message @bwintx is referring to, and I thought that, indeed, 1P could have been the culprit. I don’t know why turning everything off and then off fixed it.

2 Likes

Yep. 1Password plugin was causing it. D’oh!

Thank you for the follow-up comments, it was driving me a little mad yesterday, especially once I went to the examples on the Hugo docs pages… and they were exhibiting the same behavior. That’s when I finally thought maybe this isn’t a ‘me’ issue :smiley:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.