From b91720aeff81f350f4f5aac4938a49a11d87c261 Mon Sep 17 00:00:00 2001 From: bugfix-mission Date: Thu, 23 Apr 2026 01:04:13 +0800 Subject: [PATCH] fix(docs): widen field-list labels so 'Parameters:' isn't a column Sphinx renders ``:param:``/``:return:`` field-list ``
`` elements with a tiny intrinsic width, which on the current theme collapses labels like "Parameters:" into a one-character-wide vertical column. Add a min-width: 6em rule to dl.field-list>dt in the custom stylesheet. --- CHANGES/4127.doc.rst | 3 +++ docs/_static/css/logo-adjustments.css | 10 ++++++++++ 2 files changed, 13 insertions(+) create mode 100644 CHANGES/4127.doc.rst diff --git a/CHANGES/4127.doc.rst b/CHANGES/4127.doc.rst new file mode 100644 index 00000000000..5ec427457f4 --- /dev/null +++ b/CHANGES/4127.doc.rst @@ -0,0 +1,3 @@ +Stopped ``Parameters:``, ``Returns:`` and other field-list labels in the +rendered documentation from collapsing into a one-character-wide column by +giving ``dl.field-list>dt`` a small ``min-width`` in the custom stylesheet. diff --git a/docs/_static/css/logo-adjustments.css b/docs/_static/css/logo-adjustments.css index b93746f65fb..d2419e35153 100644 --- a/docs/_static/css/logo-adjustments.css +++ b/docs/_static/css/logo-adjustments.css @@ -5,3 +5,13 @@ .sphinxsidebarwrapper>p.logo>a>img.logo { width: 65%; } + +/* + * Prevent the "Parameters:", "Returns:", "Raises:" (and other field-list + * labels generated by Sphinx for ``:param:`` / ``:return:`` / ``:raise:``) + * from being squeezed into a one-character-wide column when the field + * body is long. See aio-libs/aiohttp#4127. + */ +dl.field-list>dt { + min-width: 6em; +}