Skip to content

fix(docs): widen field-list labels so 'Parameters:' isn't a column#12415

Draft
Bojun-Vvibe wants to merge 1 commit intoaio-libs:masterfrom
Bojun-Vvibe:fix/aio-libs-aiohttp-4127
Draft

fix(docs): widen field-list labels so 'Parameters:' isn't a column#12415
Bojun-Vvibe wants to merge 1 commit intoaio-libs:masterfrom
Bojun-Vvibe:fix/aio-libs-aiohttp-4127

Conversation

@Bojun-Vvibe
Copy link
Copy Markdown

Closes #4127

Repo

aio-libs/aiohttp

Issue

#4127

Root cause

Sphinx renders the :param: / :return: / :raise: field-list labels
("Parameters:", "Returns:", "Raises:", ...) as <dt> elements inside
<dl class="field-list">. With the current theme + browser defaults the
<dt> is given a minimal intrinsic width, so on narrower viewports the
label collapses into a one-character-wide vertical column, making it
look like text written top-to-bottom.

Fix

Add a tiny CSS rule to the project's custom stylesheet
(docs/_static/css/logo-adjustments.css) giving dl.field-list>dt a
min-width: 6em (the value suggested in the issue) so the label keeps
enough horizontal space to render on a single line.

Regression test

None. The change is a pure CSS rule in the docs stylesheet; aiohttp has
no automated visual / CSS tests for the rendered HTML, and the existing
test suite does not cover Sphinx output. A towncrier news fragment
(CHANGES/4127.doc.rst) is included instead.

Risk

trivial

Verification

skipped: pure docs/CSS change, no executable test path. Manually verified
the targeted selector matches Sphinx's field-list markup
(<dl class="field-list"><dt>Parameters</dt>...) and that the rule is
scoped narrowly enough not to affect other <dl> content.

Sphinx renders ``:param:``/``:return:`` field-list ``<dt>`` 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.
@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided There is a change note present in this PR label Apr 23, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.92%. Comparing base (365f717) to head (b91720a).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #12415   +/-   ##
=======================================
  Coverage   98.92%   98.92%           
=======================================
  Files         134      134           
  Lines       46751    46751           
  Branches     2430     2430           
=======================================
  Hits        46249    46249           
  Misses        373      373           
  Partials      129      129           
Flag Coverage Δ
CI-GHA 98.98% <ø> (ø)
OS-Linux 98.72% <ø> (-0.01%) ⬇️
OS-Windows 96.98% <ø> (ø)
OS-macOS 97.88% <ø> (+0.10%) ⬆️
Py-3.10.11 97.39% <ø> (+<0.01%) ⬆️
Py-3.10.20 97.86% <ø> (-0.01%) ⬇️
Py-3.11.15 98.10% <ø> (-0.01%) ⬇️
Py-3.11.9 97.65% <ø> (ø)
Py-3.12.10 97.73% <ø> (-0.01%) ⬇️
Py-3.12.13 98.20% <ø> (+<0.01%) ⬆️
Py-3.13.13 98.45% <ø> (+<0.01%) ⬆️
Py-3.14.4 98.51% <ø> (+0.02%) ⬆️
Py-3.14.4t 97.51% <ø> (+<0.01%) ⬆️
Py-pypy3.11.15-7.3.21 97.35% <ø> (ø)
VM-macos 97.88% <ø> (+0.10%) ⬆️
VM-ubuntu 98.72% <ø> (-0.01%) ⬇️
VM-windows 96.98% <ø> (ø)
cython-coverage 38.07% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 23, 2026

Merging this PR will not alter performance

✅ 67 untouched benchmarks
⏩ 4 skipped benchmarks1


Comparing Bojun-Vvibe:fix/aio-libs-aiohttp-4127 (b91720a) with master (365f717)

Open in CodSpeed

Footnotes

  1. 4 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

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

Labels

bot:chronographer:provided There is a change note present in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation formatting is... unusual

1 participant