docs: CSS: make cross-reference links more evident

The Sphinx Alabaster theme uses border-bottom to mark reference links; the
result does not render correctly (the underline is missing) in some browser
configurations.  Switch to using the standard text-underline property, and
use text-underline-offset to place that underline below any underscores in
the underlined text.

Suggested-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Tested-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
pull/1279/head
Jonathan Corbet 2025-06-04 08:18:40 -06:00
parent d6d1df92c2
commit 2af88a039f
1 changed files with 15 additions and 0 deletions

View File

@ -136,3 +136,18 @@ div.language-selection:hover ul {
div.language-selection ul li:hover {
background: #dddddd;
}
/* Make xrefs more universally visible */
a.reference, a.reference:hover {
border-bottom: none;
text-decoration: underline;
text-underline-offset: 0.3em;
}
/* Slightly different style for sidebar links */
div.sphinxsidebar a { border-bottom: none; }
div.sphinxsidebar a:hover {
border-bottom: none;
text-decoration: underline;
text-underline-offset: 0.3em;
}