-
Notifications
You must be signed in to change notification settings - Fork 317
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
Mis-render of "side" titles for docstring parameters #464
Comments
we (MNE-Python) fixed the wrapping problem in our local CSS like this: dl.field-list {
grid-template-columns: auto 1fr;
} I can put in a PR if that seems an acceptable solution for the general case. |
Not sure what is different about our setup but that change does not seem to have much or any effect (verified the stylesheet loaded in the browser has the change) |
oops, you're right, sorry. I remembered dealing with this issue, and I naively checked the browser console to see what rules from our custom CSS were applying to that node or its parent. But if I look at the PR where I actually tackled the problem my past self says that I expressly didn't fix the wrapping problem, which probably needs to be addressed by adjusting the media breakpoints in the theme (?). |
...although, strangely, it doesn't seem to happen on the MNE-Python site, so maybe I did eventually fix it in a different PR? Will dig deeper. |
I'm totally +1 on fixing this, but not sure what to do. IF somebody figures out a CSS fix for it I am happy to review a PR! |
@bryevdv it would be helpful if you provided a link to a page with this problem |
@choldgraf https://docs.bokeh.org/en/2.3.3/docs/reference/plotting.html#bokeh.plotting.Figure.bezier Just reiterating that personally I think a structural change that splits each args section into its own separate |
I can reproduce the problem @bryevdv is seeing, and I confirm that my suggested CSS rule doesn't fix it on the Bokeh site. I don't have time right now to rigorously compare the CSS files and
in some quick-but-not-rigorous testing, this is possible with: dl.field-list {
display: unset;
} or dl.field-list {
display: grid;
grid-template-columns: unset; If the theme maintainers want to go that route, however, I'd expect some corresponding style changes to the |
this is an autodoc specific thing right? I am happy to special-case autodoc output with some CSS that only works for it, or something like that |
@choldgraf we use Google style docstrings with
by default. AFAIK those are processed by the sphinx std python domain. |
@drammock yah that could use some tweaking but it's already much better, I will probably put this with some tweaks in the next Bokeh release as a stopgap, just because of how much it improves (looks good on narrow viewport too). Thank you! |
The whole docstring / API page styling can probably use a redesign (there were some other autodoc related changes due to sphinx as well: #460) I agree that having the "Parameters" etc in a separate column is not very robust long term, it will always give problems when the screen gets smaller (in addition to wasting space). As usual, we can get some inspiration from Furo: https://pradyunsg.me/furo/reference/api/. It puts the title above the content (not inheriting from basic.css gives that automatically), and adds a small indentation to the content (and in addition also makes the title upper case). CSS: https://github.com/pradyunsg/furo/blob/main/src/furo/assets/styles/content/_api.sass |
+1 to doing whatever Furo does :-) |
cc @choldgraf @jorisvandenbossche
As the viewport narrows:
Leading eventually to:
I would personally like to see the "Parameters" and "Keyword Arguments" headings above their respective lists, rather than off to the side, with the lists of parameters and their docs getting full (or nearly full) width, Apart from the amusing results above on narrow viewports, it's also a huge waste of vertical space below the headings on wide viewports:
The text was updated successfully, but these errors were encountered: