Open ArachnidAbby opened 2 years ago
I have the same issue. As a bonus info I can share that I tried to bisect the problem, by installing older versions of the theme, but as far back as 0.2.0 (which is the oldest I could install) I can replicate the faulty behavior. This suggests to me that the bug is brought on by a change elsewhere, which just now reveals a potential bug in the theme.
Environment info:
EDIT: Addition environment information: I should probably also mention, that for my case the pages that showed this behavior were generated by autodoc from docstring written in the Google style and parsed with Napoleon.
Thanks for replicating it, Is there anyway to avoid this behavior?
@spidertyler2005 I'm not associated with the project and I'm afraid I don't have the bandwidth to try and fix it, so for me unfortunately I will wait until someone from the project notices this bug. But, you can probably remove the "Needed: replication" label, that might help for visibility.
This might be the source of the issue:
I'm seeing the same thing on my doc builds. If you use dev-tools to uncheck display: inline-block
everything appears normal.
(It will be on the parent container <dl class="py property">
)
@spidertyler2005 @KennethNielsen
Here's a gist that replicates the issue.
When built, the <dl class="py property">
tags are displayed as inline-block (as they do in the above screenshot).
If built with the last line of conf.py uncommented, the display property is overridden by css and they appear as expected.
(you'll have to do a make clean
in between builds)
Note: This is not a fix, it's a hack. Only meant to demonstrate the cause of the issue.
Having the same issue. Is there a proper fix in sight?
Ran into this today.
echoing the previous comment, "Is there a proper fix in sight?"
@westonplatter @johannes-mueller Can always just use the css override in my last comment.
If it's not going to be fixed by the maintainers, monkeyhacking is always a viable solution. (As of this comment, the style for ".property" still has display: inline-block;
when it should just be display: block;
For anybody affected arriving here, a mini guide on monkeypatching this until the PR is hopefully merged someday:
conf.py
, ensure it has a html_static_path
declaration, for example:
html_static_path = ['_static']
html_css_files
declaration:
html_css_files = ["custom.css"]
_static
folder (or whatever you had it configured to.)custom.css
file looking like so:
/*
Fix for horizontal stacking weirdness in the RTD theme with Python properties:
https://github.com/readthedocs/sphinx_rtd_theme/issues/1301
*/
.py.property {
display: block !important;
}
make clean
+ make html
and you should be looking good! ✨I'm hitting the same issue with sphinx-rtd-theme 2.0.0.
Problem
Multiple properties I defined in the docs are all stacking on a single line. I have no idea what could be causing it. Using
|
to force a new line just adds too much space to be reasonable.Before you continue reading, thanks in advance for looking at my issue. Sorry if I just messed up my RST, I am fairly new to writing documentation in sphinx.
Reproducible Project
I think this should be the minimum needed to reproduce it. Just note that it doesn't happen on smaller screen widths.
Error Logs/Results
No errors but here is a picture of what I see.
Expected Results
I expected each entry to be on a separate line regardless of the screen width.
Environment Info