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

Extra border around the code block #14

Closed
mrprofessor opened this issue Jun 10, 2020 · 8 comments
Closed

Extra border around the code block #14

mrprofessor opened this issue Jun 10, 2020 · 8 comments
Labels

Comments

@mrprofessor
Copy link

mrprofessor commented Jun 10, 2020

orgcss is showing an extra border around the code block

my org file:

#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="https://gongzhitaao.org/orgcss/org.css"/>

* Source code
** python

#+BEGIN_SRC python

import os

print("Hello people")

#+END_SRC

Result

image

I am using org version 9.4

@mrprofessor
Copy link
Author

@gongzhitaao ^^^

@gongzhitaao
Copy link
Owner

Thank you @mrprofessor for reporting this. Yes, I saw this bug. Sorry I didn't reply earlier. I was busy with other work stuff. I will investigate sometime this week.

@mrprofessor
Copy link
Author

Thank you @gongzhitaao

@gongzhitaao
Copy link
Owner

gongzhitaao commented Jun 21, 2020

The stable version of Org is 9.3.7, as of June 2020, and I couldn't reproduce this on the current stable version. Are you using the dev version?

@pjhuxford
Copy link

I have the same issue on Org 9.3 and Org 9.3.6. I was able to work around this by adding the line #+options: html-style:nil to my org document, however this makes src blocks with no language render with no border. You can obtain a border for them by adding a dummy language to the src block, e.g.

#+begin_src fake-language
fake code
#+end_src

@gongzhitaao
Copy link
Owner

@pjhuxford Thanks, let me try reproducing this.

@shichaoxia
Copy link

shichaoxia commented Aug 25, 2020

Using #+HTML_HEAD in an org file then C-c C-e h h (org-export-dispatch html) appends superfluous css codes generated automatically by org mode. Inside that code, pre { border: 1px solid #ccc; ... is defined. That's the reason extra border appears.

To just turn off the default style, customize org-html-head-include-default-style variable, or use this option line #+OPTIONS: html-style:nil in the Org file. Org doc.

@gongzhitaao
Copy link
Owner

@shichaoxia Thanks, that makes sense. I was wondering why I couldn't reproduce this as I configure this in my init file.

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

No branches or pull requests

4 participants