1

I have a very tight spacing between methods in sphinx. Is there a way for me to increase the spacing between them?

Original code:

.. method:: stop()
    :abstractmethod:

    Stop the service. Blocking.

.. method:: is_alive()
    :abstractmethod:

    Check if the service is currently running.

    :rtype: bool

.. method:: __enter__()

Rendered HTML:

enter image description here

bad_coder
  • 11,289
  • 20
  • 44
  • 72
Bharel
  • 23,672
  • 5
  • 40
  • 80
  • 1
    Hello, I removed the [tag:documentation-generation] because it's implicit in the python-sphinx tag. See [It is safe to burn all of our [documentation](https://meta.stackoverflow.com/q/359933). It only makes sense to use that tag if the input/output of the generation process is using unusual formats. – bad_coder Feb 23 '21 at 14:13
  • Override the sphinx theme you are using to increase spacing in generated HTML. – Lex Li Feb 23 '21 at 15:13
  • I thought there's an option to do so without resorting to custom css. I guess not. – Bharel Feb 24 '21 at 08:46

1 Answers1

0

Doing so is impossible without changing a theme or adding custom CSS.

For more info, see How to add custom css file to Sphinx?

Bharel
  • 23,672
  • 5
  • 40
  • 80