Linux Documentation
 help / color / mirror / Atom feed
From: Jonathan Corbet <corbet@lwn.net>
To: Daniel Lundberg Pedersen <dlp@qtec.com>,
	linux-doc@vger.kernel.org, linux-media@vger.kernel.org,
	Rito Rhymes <rito@ritovision.com>
Subject: Re: Bad wrapping in some tables
Date: Tue, 07 Jul 2026 11:36:54 -0600	[thread overview]
Message-ID: <87pl0yr9ah.fsf@trenco.lwn.net> (raw)
In-Reply-To: <c542aaf7-6a40-4730-8bd6-208c9fe932d5@qtec.com>

Daniel Lundberg Pedersen <dlp@qtec.com> writes:

> I've noticed some bad wrapping happening in tables, seemingly only in
> the Media docs, but that's also where I look the most, after v7.1.
>
> See:
>
> https://www.kernel.org/doc/html/v7.1/userspace-api/media/v4l/vidioc-create-bufs.html#c.V4L.v4l2_create_buffers
>
> Compared to:
>
> https://www.kernel.org/doc/html/v7.0/userspace-api/media/v4l/vidioc-create-bufs.html#c.V4L.v4l2_create_buffers
>
> Other tables have also changed, but they don't end up this bad, e.g:
>
> https://www.kernel.org/doc/html/v7.1/process/debugging/kgdb.html#run-time-parameter-kgdbreboot
>
> I've bisected it to be f2679ac773899f5fdea0b68d5077eef5f88dfd42 that
> has caused the change, and I did try some quick changes to see if I
> could fix it for the tables, but I didn't get any positive results.

For future reference, it really does help to copy the maintainer and the
author of the patch.

The patch in question tweaked our CSS thusly:

> +code.docutils.literal span.pre {
> +    white-space: normal;
> +    overflow-wrap: anywhere;
> +}

That overflow-wrap line is the problem.  The patch was trying to improve
overflow from some literal blocks, but it does seem that the cure is
worse than the disease.

I've just made the attached revert - thanks for the report!

jon

From 1afefde902c5267d1197da8a3b039354ed771d37 Mon Sep 17 00:00:00 2001
From: Jonathan Corbet <corbet@lwn.net>
Date: Tue, 7 Jul 2026 11:34:47 -0600
Subject: [PATCH] Revert "docs: allow inline literals in paragraphs to wrap to
 prevent overflow"

This reverts commit f2679ac773899f5fdea0b68d5077eef5f88dfd42.

This change causes truly unreadable breaking of literal strings in a number
of settings.

Reported-by: Daniel Lundberg Pedersen <dlp@qtec.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
---
 Documentation/sphinx-static/custom.css | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/Documentation/sphinx-static/custom.css b/Documentation/sphinx-static/custom.css
index 5aa0a1ed9864..2e019c8f8a56 100644
--- a/Documentation/sphinx-static/custom.css
+++ b/Documentation/sphinx-static/custom.css
@@ -156,15 +156,6 @@ 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;
-}
-
 /* Let rendered reference links in tables wrap when needed. */
 div.body table.docutils a.reference {
     overflow-wrap: anywhere;
-- 
2.54.0



  parent reply	other threads:[~2026-07-07 17:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-07 16:39 Bad wrapping in some tables Daniel Lundberg Pedersen
2026-07-07 17:14 ` Manuel Ebner
2026-07-07 17:36 ` Jonathan Corbet [this message]
2026-07-10  6:55   ` Rito Rhymes
2026-07-10  8:11     ` Hans Verkuil
2026-07-10  8:42       ` Mauro Carvalho Chehab
2026-07-10 12:38     ` Daniel Lundberg Pedersen
2026-07-10 13:17       ` Mauro Carvalho Chehab
2026-07-10 15:34     ` 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=87pl0yr9ah.fsf@trenco.lwn.net \
    --to=corbet@lwn.net \
    --cc=dlp@qtec.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=rito@ritovision.com \
    /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