Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code blocks should not have the zenburn background when using pygments / coderay #27

Open
wackywendell opened this issue May 5, 2015 · 4 comments

Comments

@wackywendell
Copy link
Contributor

Right now, when using :source-highlighter: pygments, the background color of the code blocks will still be the color of the zenburn background, and not the appropriate one from pygments.

This might be a reveal.js issue (hakimel/reveal.js#1114), but I haven't quite figured it out.

@mojavelinux
Copy link
Member

You are correct that this is an issue with this backend. We need to be checking which syntax highlighter is in use before adding the zenburn style to the HTML output.

@wackywendell
Copy link
Contributor Author

Well... I may be over my head, but I'm not sure its quite that simple. I tried just removing the <link href="[...]/zenburn.css"> line from the HTML output, and it still has that same color.

Looking at the Developer Tools > Inspector in Firefox lead me to this:

.reveal pre code {
  display: block;
  padding: 5px;
  overflow: auto;
  max-height: 400px;
  word-wrap: normal;
  background: #3F3F3F;
  color: #DCDCDC; }

Which comes from simple.css line 140.

It looks to me like the background and color attributes shouldn't be there (i.e., its a problem with reveal.js), or should be overridden when not using highlight.js. Overridden might make more sense, as that also covers "plain" code blocks where pygments / coderay wasn't run.

@mojavelinux
Copy link
Member

should be overridden when not using highlight.js

Yes, this is the second part to the change. We have to do a lot of this in the default Asciidoctor stylesheet, so it's the same routine here.

@obilodeau
Copy link
Member

Is this still an issue? Can I get a more precise reproducible case with screenshots?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants