[PATCH 1/1] docs: allow long unbroken headings to wrap and prevent overflow
From: Rito Rhymes
Date: Sat Mar 21 2026 - 10:49:31 EST
Some documentation pages contain long headings with unbroken strings
that can exceed the content width and cause page-wide horizontal
overflow.
Allow headings to wrap when needed so they stay within the content
column and do not break page layout.
Signed-off-by: Rito Rhymes <rito@xxxxxxxxxxxxxx>
---
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..14711c7be 100644
--- a/Documentation/sphinx-static/custom.css
+++ b/Documentation/sphinx-static/custom.css
@@ -8,6 +8,13 @@ div.body h1 { font-size: 180%; }
div.body h2 { font-size: 150%; }
div.body h3 { font-size: 130%; }
div.body h4 { font-size: 110%; }
+/*
+ * Let long headings wrap before they overflow page layout.
+ */
+div.body h1, div.body h2, div.body h3, div.body h4,
+div.body h5, div.body h6 {
+ overflow-wrap: anywhere;
+}
/* toctree captions are styled like h2 */
div.toctree-wrapper p.caption[role=heading] { font-size: 150%; }
--
2.51.0