You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation generated with the autoclass directive for python classes placed in a module with a long import path overflows the wy-nav-content div.
To fix just on your specific project, you could put the following line in your custom CSS. See the image at the end of this StackOverflow answer for the effect (look at "SomeLongModule.SomeLongClassName"). It breaks long identifiers (or any long word) but only if strictly necessary to fit everything within the width.
This is not to say that this bug report is invalid. IMO, the theme should include that styling by default.
A disadvantage of this approach is that the break can be anywhere in the identifier, whereas maybe it would be better to only break next to a dot (i.e. "foo.bar" becomes "foo.\nbar"). I don't think that can be done in CSS though so it would need a change in document generation in sphinx itself rather than in the theme (to insert <wbr> elements next to dots). But I actually quite like that the above CSS works even with long identifier fragments and non-identifier words.
Problem
The documentation generated with the autoclass directive for python classes placed in a module with a long import path overflows the
wy-nav-content
div.Reproducible Project
https://github.com/federicodabrunzo/render-issue-for-autodoc-generated-class-with-long-import-path/tree/main?tab=readme-ov-file
Error Logs/Results
Expected Results
The
<dt>
element containing the class import path should not overflow its containing elements.Environment Info
3.11.9
8.1.3
3.0.1
The text was updated successfully, but these errors were encountered: