From 2f38e86cea78c9b31372d0c291119deae5044c6f Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sat, 3 Feb 2024 23:26:28 +0200 Subject: [PATCH 1/5] Only apply underline offset to code formatting for underline visibility --- python_docs_theme/static/pydoctheme.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index 14464db..dff8ee8 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -31,7 +31,10 @@ pre { a[href] { text-decoration: underline 1px; + +a[href]:has(> code) { text-underline-offset: 0.25em; + color: red; } body { From 98b94c5e56aa86ef887730263993297ead57f7a9 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sat, 3 Feb 2024 23:32:33 +0200 Subject: [PATCH 2/5] Remove debugging --- python_docs_theme/static/pydoctheme.css | 1 - 1 file changed, 1 deletion(-) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index dff8ee8..d404934 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -34,7 +34,6 @@ a[href] { a[href]:has(> code) { text-underline-offset: 0.25em; - color: red; } body { From 2dd4e77cbcf5d2f46f723a81c3938e2de22a08e2 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sat, 3 Feb 2024 23:46:30 +0200 Subject: [PATCH 3/5] Add missing bracket --- python_docs_theme/static/pydoctheme.css | 1 + 1 file changed, 1 insertion(+) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index d404934..263f3f6 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -31,6 +31,7 @@ pre { a[href] { text-decoration: underline 1px; +} a[href]:has(> code) { text-underline-offset: 0.25em; From 2f3f86ec603341cce76616ed2f83c8a9ee0a4b4e Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 4 Feb 2024 19:20:50 +0200 Subject: [PATCH 4/5] Add comments --- python_docs_theme/static/pydoctheme.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index 8112fa4..959a94e 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -29,10 +29,12 @@ pre { color: inherit; } +/* Add underlines to links */ a[href] { text-decoration: underline 1px; } +/* Increase the underline offset for code to avoid obscuring underscores */ a[href]:has(> code) { text-underline-offset: 0.25em; } From fbf2bf896c464dcb192735f8e5d1222d5dcdc1eb Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 4 Feb 2024 19:22:35 +0200 Subject: [PATCH 5/5] Whitespace between CSS blocks --- python_docs_theme/static/pydoctheme.css | 1 + 1 file changed, 1 insertion(+) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index 959a94e..87a0629 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -38,6 +38,7 @@ a[href] { a[href]:has(> code) { text-underline-offset: 0.25em; } + /* No underline for navigation */ a.headerlink, div.genindex-jumpbox a,