Skip to content

DOC: Render field list headings in the same style as rubrics - #4941

Draft
seisman wants to merge 1 commit into
mainfrom
doc/css-field-list-style
Draft

seisman wants to merge 1 commit into
mainfrom
doc/css-field-list-style

Conversation

@seisman

@seisman seisman commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Render the headings of field lists (e.g., "Parameters", "Returns") in the same style as rubrics (e.g., "Examples", "Notes"), instead of in a grey box.

Implemented by Claude Opus 5.5, reviewed by @seisman.

Preview:

Render the headings of field lists (e.g., "Parameters", "Returns") in the
same style as rubrics (e.g., "Examples", "Notes"), instead of in a grey box.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@seisman seisman added the maintenance Boring but important stuff for the core devs label Oct 4, 2026
@seisman

seisman commented Oct 4, 2026 •

Copy link
Copy Markdown
Member Author

With changes in this PR, now "Parameters"/"Examples" all have the same stype, as shown below:
image

However, it seems that both sphinx_rtd_theme and sphinx_pydata_theme use different styles for "Parameters" and "Examples", e.g., https://pandas.pydata.org/docs/reference/api/pandas.api.typing.Resampler.apply.html.

Reading https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html#confval-napoleon_custom_sections, it seems it's intended that "Parameters"/"Returns" have different styles, compared to other section headings.

One thing that I like sphinx_pydata_theme is that, it shows the parameter name and description on separate lines, e.g.,
image
which is more readable than the sphinx_rtd_theme's behavior, e.g.,

image

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant