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, Rito Rhymes <rito@ritovision.com>
Subject: [PATCH v2 1/1] docs: allow inline literals in paragraphs to wrap to prevent overflow
Date: Sun, 22 Mar 2026 14:32:13 -0400 [thread overview]
Message-ID: <20260322183213.52235-2-rito@ritovision.com> (raw)
In-Reply-To: <20260322183213.52235-1-rito@ritovision.com>
Some documentation pages contain long inline literals in paragraph
text that can force page-wide horizontal scroll overflow and break
layout on smaller screens.
Override the default `span.pre` white-space behavior for inline
literals and use `overflow-wrap: anywhere` so they can wrap when
needed. For code used as part of a paragraph, wrapping is appropriate
because it is stylistically part of the surrounding text. Code blocks,
by contrast, are meant to preserve formatting fidelity and are better
served by contained horizontal scrolling.
Signed-off-by: Rito Rhymes <rito@ritovision.com>
Assisted-by: Codex:GPT-5.4
---
v2: add Assisted-by attribution
Documentation/sphinx-static/custom.css | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/Documentation/sphinx-static/custom.css b/Documentation/sphinx-static/custom.css
index db24f4344..dd69df2a7 100644
--- a/Documentation/sphinx-static/custom.css
+++ b/Documentation/sphinx-static/custom.css
@@ -149,6 +149,15 @@ div.language-selection ul li:hover {
background: #dddddd;
}
+/*
+ * Let long inline literals in paragraph text wrap as needed to prevent
+ * overflow.
+ */
+code.docutils.literal span.pre {
+ white-space: normal;
+ overflow-wrap: anywhere;
+}
+
/* Make xrefs more universally visible */
a.reference, a.reference:hover {
border-bottom: none;
--
2.51.0
next prev parent reply other threads:[~2026-03-22 18:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-21 14:11 [PATCH 0/1] docs: examples of pages affected by inline literal overflow Rito Rhymes
2026-03-21 14:11 ` [PATCH 1/1] docs: allow inline literals in paragraphs to wrap to prevent overflow Rito Rhymes
2026-03-21 21:03 ` Randy Dunlap
2026-03-22 18:32 ` [PATCH v2 0/1] docs: examples of pages affected by inline literal overflow Rito Rhymes
2026-03-22 18:32 ` Rito Rhymes [this message]
2026-03-23 15:14 ` [PATCH v3] docs: allow inline literals in paragraphs to wrap to prevent overflow Rito Rhymes
2026-03-25 19:23 ` Jonathan Corbet
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=20260322183213.52235-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=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