Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: allow inline literals in paragraphs to wrap to prevent overflow

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.

Examples:
https://docs.kernel.org/6.15/userspace-api/futex2.html
https://docs.kernel.org/6.15/security/IMA-templates.html

Signed-off-by: Rito Rhymes <rito@ritovision.com>
Assisted-by: Codex:GPT-5.4
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260323151401.27415-1-rito@ritovision.com>

authored by

Rito Rhymes and committed by
Jonathan Corbet
f2679ac7 19dcccbc

+9
+9
Documentation/sphinx-static/custom.css
··· 149 149 background: #dddddd; 150 150 } 151 151 152 + /* 153 + * Let long inline literals in paragraph text wrap as needed to prevent 154 + * overflow. 155 + */ 156 + code.docutils.literal span.pre { 157 + white-space: normal; 158 + overflow-wrap: anywhere; 159 + } 160 + 152 161 /* Make xrefs more universally visible */ 153 162 a.reference, a.reference:hover { 154 163 border-bottom: none;