sphinxawesome-theme icon indicating copy to clipboard operation
sphinxawesome-theme copied to clipboard

code block left margin?

Open wxrl opened this issue 1 year ago • 2 comments

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.

wxrl avatar Jun 06 '23 07:06 wxrl

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

kai687 avatar Jun 06 '23 15:06 kai687

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)

kai687 avatar Jun 12 '23 13:06 kai687