From 013d7cb2a8e28eccd585df3ee8541867fb32b4a8 Mon Sep 17 00:00:00 2001 From: Nadav Tasher Date: Tue, 28 Oct 2025 01:32:38 +0200 Subject: [PATCH 1/2] Allow anchors to wrap anywhere Anchors with very long unbreakable links cause pages to be horizontally scrollable on mobile. Fix this by allowing anchors to break words. --- sphinx/themes/basic/static/basic.css.jinja | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sphinx/themes/basic/static/basic.css.jinja b/sphinx/themes/basic/static/basic.css.jinja index d2411760b18..c48c04614b1 100644 --- a/sphinx/themes/basic/static/basic.css.jinja +++ b/sphinx/themes/basic/static/basic.css.jinja @@ -230,6 +230,10 @@ a:visited { color: #551A8B; } +a { + overflow-wrap: break-word; +} + h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, From eec9eb1a063a7caf2dabaa5d465cd9dca8762d4f Mon Sep 17 00:00:00 2001 From: Nadav Tasher Date: Tue, 28 Oct 2025 01:33:38 +0200 Subject: [PATCH 2/2] Added #13989 to CHANGES.rst --- CHANGES.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 3a90d66f08d..e9d8394381d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -134,6 +134,8 @@ Bugs fixed Patch by Jeremy Maitin-Shepard. * #13939: LaTeX: page break can separate admonition title from contents. Patch by Jean-François B. +* #13989: Allow anchors to wrap anywhere. + Patch by Nadav Tasher. Testing