sphinx-needs icon indicating copy to clipboard operation
sphinx-needs copied to clipboard

Support for Sphinx Book Theme

Open twodrops opened this issue 2 years ago • 2 comments

The Book Theme is a well maintained Sphinx-Theme in comparision to the popular Sphinx RTD Theme. (66 open PRs as on 05.09.2022).

Similar to the RTD Theme, the Book Theme does not work with Sphinx-Needs 1.0.1+ because of doc-utils problem, which hopefully will be fixed by them soon. An issue exists for this already.

The Book Theme however has some issues with Sphinx-Needs 0.7.9 and this problem would probably exist even when the docutils issue above is solved. So as a preparation, these issues needs to be solved.

image

  1. The rendering of Sphinx-Needs with Book Theme is not ideal. Grey Needs Layout (Alabaster like) which does not go well with the overall Book Theme look and feel.
  2. The Collapse/Expand Button is missing.

Needs-Table rendering works pretty good with Sphinx Book Theme.

twodrops avatar Sep 05 '22 08:09 twodrops

This should be checked also the https://pydata-sphinx-theme.readthedocs.io/en/stable/ theme.

However, changing the common need-style is CSS work. We can't change it in general, as then it would maybe not fit other themes anymore.

But we have this concept of need-themes, by default, modern, blank, and dark are available. https://pydata-sphinx-theme.readthedocs.io/en/stable/ Maybe one of them is already working. For sure we could add a fourth one, which fits best for book/pydata theme.

danwos avatar Sep 06 '22 06:09 danwos

ah, sorry I completely forgot about https://sphinxcontrib-needs.readthedocs.io/en/latest/configuration.html#needs-css Therefore it makes sense to leave it to the user to customize it to match the theme used. We could close this. Thanks for the hint.

twodrops avatar Sep 11 '22 05:09 twodrops