mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 04:21:09 -04:00
docs: contain horizontal overflow in C API descriptions
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. Examples: https://docs.kernel.org/6.15/driver-api/regulator.html https://docs.kernel.org/6.15/userspace-api/fwctl/fwctl-cxl.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: <20260323153342.33447-1-rito@ritovision.com>
This commit is contained in:
committed by
Jonathan Corbet
parent
f2679ac773
commit
3aff388bc4
@@ -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; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user