-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Style sheet class 'property' conflicts with autodoc generated html of python properties 'py property' #1247
Labels
Comments
I just stumbled upon this very issue as well. As an easy workaround until it is fixed, adding the following custom CSS works well for me: dl.py.property {
display: block !important;
} |
luator
added a commit
to open-dynamic-robot-initiative/trifinger_simulation
that referenced
this issue
Oct 27, 2021
That is a great workaround. Thank you! |
luator
added a commit
to open-dynamic-robot-initiative/trifinger_simulation
that referenced
this issue
Dec 3, 2021
luator
added a commit
to open-dynamic-robot-initiative/trifinger_simulation
that referenced
this issue
Dec 3, 2021
luator
added a commit
to open-dynamic-robot-initiative/trifinger_simulation
that referenced
this issue
Dec 3, 2021
luator
added a commit
to open-dynamic-robot-initiative/trifinger_simulation
that referenced
this issue
Dec 3, 2021
luator
added a commit
to machines-in-motion/breathing-cat
that referenced
this issue
Sep 27, 2022
The RTD theme has an incompatibility issue with autodoc as both use a "property" CSS class for different purposes. Add a custom CSS file with a workaround to fix this issue. See readthedocs/sphinx_rtd_theme#1247 for more information.
This was referenced Nov 4, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
I am using
sphinx.ext.autodoc
to generate documentation for a python project. Python properties can become ordered horizontally instead of vertically, depending on the width of the docstring (see B in the image below).Autodoc generates html tags with
class="py [element_type]"
whereelement_type
isclass
,method
,attribute
,property
, and so on (D).Unfortunately, the CSS class for the prefix of a class (A) also has
class="property"
, which this theme stylizes (E).Yes, this problem very much originates from autodoc or sphinx (not sure here). But I doubt they will change the generated class names, because it would break many existing themes.
Reproducible Project
See repo here.
Error Logs/Results
Expected Results
Maybe this theme can use a
not(.py)
classifier in the CSS for.property
such that theclass = "py property"
is not matched. I'm not a frontend person, so I don't know if this is viable or how to achieve it.Related to sphinx-doc/sphinx#9663
Environment Info
The text was updated successfully, but these errors were encountered: