From: Rito Rhymes <rito@ritovision.com>
To: Jonathan Corbet <corbet@lwn.net>, linux-doc@vger.kernel.org
Cc: Shuah Khan <skhan@linuxfoundation.org>,
linux-kernel@vger.kernel.org, rdunlap@infradead.org,
Rito Rhymes <rito@ritovision.com>
Subject: [PATCH v2 1/1] docs: contain horizontal overflow in C API descriptions
Date: Sun, 22 Mar 2026 15:37:39 -0400 [thread overview]
Message-ID: <20260322193740.68784-2-rito@ritovision.com> (raw)
In-Reply-To: <20260322193740.68784-1-rito@ritovision.com>
Some documentation pages contain long C API signatures that can exceed
the content width and cause page-wide horizontal scroll overflow.
Apply contained horizontal scrolling to C API description blocks and
keep their signature rows on one line. This preserves signature
formatting while preventing them from breaking page layout.
Contained horizontal scrolling is preferred over wrapping here because
code fidelity is the priority. These blocks are intended to remain
representative of the code itself. Wrapping distorts spacing and line
structure, which affects fidelity, creates misleading renderings, and
reduces readability.
Signed-off-by: Rito Rhymes <rito@ritovision.com>
Assisted-by: Codex:GPT-5.4
---
v2: add Assisted-by attribution and clarify scrolling trade-offs
Documentation/sphinx-static/custom.css | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/sphinx-static/custom.css b/Documentation/sphinx-static/custom.css
index db24f4344..18bf8813b 100644
--- a/Documentation/sphinx-static/custom.css
+++ b/Documentation/sphinx-static/custom.css
@@ -40,6 +40,13 @@ li { text-indent: 0em; }
dl.function, dl.struct, dl.enum { margin-top: 2em; background-color: #ecf0f3; }
/* indent lines 2+ of multi-line function prototypes */
dl.function dt { margin-left: 10em; text-indent: -10em; }
+/*
+ * Preserve C API signatures on one line and apply contained horizontal
+ * scrolling to prevent them from exceeding their container width and
+ * breaking page layout.
+ */
+dl.c { overflow-x: auto; overflow-y: hidden; }
+dl.c > dt.sig.sig-object { white-space: nowrap; }
dt.sig-object { font-size: larger; }
div.kernelindent { margin-left: 2em; margin-right: 4em; }
--
2.51.0
next prev parent reply other threads:[~2026-03-22 19:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-21 14:25 [PATCH 0/1] docs: examples of pages affected by C API signature overflow Rito Rhymes
2026-03-21 14:25 ` [PATCH 1/1] docs: contain horizontal overflow in C API descriptions Rito Rhymes
2026-03-21 21:12 ` Randy Dunlap
2026-03-22 19:37 ` [PATCH v2 0/1] docs: examples of pages affected by C API signature overflow Rito Rhymes
2026-03-22 19:37 ` Rito Rhymes [this message]
2026-03-22 20:35 ` Jonathan Corbet
2026-03-23 9:57 ` Rito Rhymes
2026-03-23 13:42 ` Jonathan Corbet
2026-03-23 15:33 ` [PATCH v3] docs: contain horizontal overflow in C API descriptions Rito Rhymes
2026-03-25 19:00 ` Jonathan Corbet
2026-03-25 20:50 ` Rito Rhymes
2026-03-25 21:14 ` Jonathan Corbet
2026-03-26 19:10 ` Rito Rhymes
2026-03-26 18:43 ` [PATCH v4] docs: wrap long C API signatures to prevent page overflow Rito Rhymes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260322193740.68784-2-rito@ritovision.com \
--to=rito@ritovision.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=skhan@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox