Skip to content

Commit b91720a

Browse files
author
bugfix-mission
committed
fix(docs): widen field-list labels so 'Parameters:' isn't a column
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.
1 parent 365f717 commit b91720a

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

CHANGES/4127.doc.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Stopped ``Parameters:``, ``Returns:`` and other field-list labels in the
2+
rendered documentation from collapsing into a one-character-wide column by
3+
giving ``dl.field-list>dt`` a small ``min-width`` in the custom stylesheet.

docs/_static/css/logo-adjustments.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,13 @@
55
.sphinxsidebarwrapper>p.logo>a>img.logo {
66
width: 65%;
77
}
8+
9+
/*
10+
* Prevent the "Parameters:", "Returns:", "Raises:" (and other field-list
11+
* labels generated by Sphinx for ``:param:`` / ``:return:`` / ``:raise:``)
12+
* from being squeezed into a one-character-wide column when the field
13+
* body is long. See aio-libs/aiohttp#4127.
14+
*/
15+
dl.field-list>dt {
16+
min-width: 6em;
17+
}

0 commit comments

Comments
 (0)