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 block left margin? #1360

Closed
wxrl opened this issue Jun 6, 2023 · 2 comments · Fixed by #1854
Closed

code block left margin? #1360

wxrl opened this issue Jun 6, 2023 · 2 comments · Fixed by #1854

Comments

@wxrl
Copy link

wxrl commented Jun 6, 2023

Python version: 3.11.3; Sphinx version: 6.2.1

So no matter whether I install via

pip install sphinxawesome-theme --pre

or

pip install git+https://github.com/kai687/sphinxawesome-theme.git

And added the theme (without extra option set)

For the simple code block piece as shown below (copied from your example page)

.. code-block:: python

   print("Hello World")

I got the block rendered WITHOUT any left margin for every line inside the code block (the letters inside the code block start right close to the left border line of the code block).

Screenshot from 2023-06-06 15-41-56

But for other blocks e.g. the note block, I got the same display as in your example pages.

@kai687
Copy link
Owner

kai687 commented Jun 6, 2023

Thanks for reporting this and the details. I'll take a look!

@kai687
Copy link
Owner

kai687 commented Jun 12, 2023

I think I figured it out. If I add sphinxawesome_theme.highlighting to the list of extensions, the spacing is correct. This means I either need to change the CSS selector for the margin (in such a way that the emphasized/added/removed lines still look good) or I always load the internal extension. (can't load extensions from html_theme)

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

Successfully merging a pull request may close this issue.

2 participants