[PATCH 0/1] docs: examples of pages affected by inline literal overflow

Rito Rhymes posted 1 patch 1 week, 6 days ago
There is a newer version of this series
Documentation/sphinx-static/custom.css | 9 +++++++++
1 file changed, 9 insertions(+)
[PATCH 0/1] docs: examples of pages affected by inline literal overflow
Posted by Rito Rhymes 1 week, 6 days ago
Examples of affected pages on docs.kernel.org this patch improves:
  userspace-api/futex2.html
  userspace-api/seccomp_filter.html
  hid/intel-ish-hid.html
  hid/hid-bpf.html
  userspace-api/media/v4l/ext-ctrls-codec.html
  core-api/dma-api-howto.html
  security/IMA-templates.html
  virt/kvm/arm/hypercalls.html
  hwmon/hp-wmi-sensors.html
  bpf/map_devmap.html

Rito Rhymes (1):
  docs: allow inline literals in paragraphs to wrap to prevent overflow

 Documentation/sphinx-static/custom.css | 9 +++++++++
 1 file changed, 9 insertions(+)

-- 
2.51.0
[PATCH v2 0/1] docs: examples of pages affected by inline literal overflow
Posted by Rito Rhymes 1 week, 5 days ago
Examples of affected pages on docs.kernel.org this patch improves:
  userspace-api/futex2.html
  userspace-api/seccomp_filter.html
  hid/intel-ish-hid.html
  hid/hid-bpf.html
  userspace-api/media/v4l/ext-ctrls-codec.html
  core-api/dma-api-howto.html
  security/IMA-templates.html
  virt/kvm/arm/hypercalls.html
  hwmon/hp-wmi-sensors.html
  bpf/map_devmap.html

Rito Rhymes (1):
  docs: allow inline literals in paragraphs to wrap to prevent overflow

 Documentation/sphinx-static/custom.css | 9 +++++++++
 1 file changed, 9 insertions(+)

-- 
2.51.0
[PATCH v2 1/1] docs: allow inline literals in paragraphs to wrap to prevent overflow
Posted by Rito Rhymes 1 week, 5 days ago
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