syntaxhighlighter
syntaxhighlighter copied to clipboard
Allow SyntaxHighlighter to reuse the theme's font family and size
On my blog, SyntaxHighlighter block renders like this:
Notice the size and font mismatch between the post text, especially the inline <code> tags, and the syntax highlighted block. That's because the theme defines font-family: monospace for <code>, and it resolves to Courier. While SyntaxHighlighter's own hardcoded styles set a custom font-family, which resolves to Monaco in my case.
I'd like to tell SyntaxHighlighter to only do syntax highlighting and nothing else. For non-related styles, just blend into the blog's theme defaults.
Also, almost all SyntaxHighlighter styles are specified with !important which makes them harder to override.
I agree. It would be great if the plugin adhered to the theme's style whenever/wherever possible. Or if there were an easy way to override the default plugin style. I would just like to add a 1em margin and some padding around the thing but it is being stubborn!
Maybe there should be a new "minimalist" style that only makes the bare minimum number of changes to a blog's CSS? That way we preserve the plugin's current behavior for people who might need/want it.