From d9c0a65df74296d7505657d72af748291c8e412b Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Mon, 28 Apr 2025 10:09:01 +0900 Subject: [PATCH 1/2] Polish link underline in Darkfish CSS This aims to make sure an underline in a link doesn't overlap with underscores in a method name. --- lib/rdoc/generator/template/darkfish/css/rdoc.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/rdoc/generator/template/darkfish/css/rdoc.css b/lib/rdoc/generator/template/darkfish/css/rdoc.css index 4a8bc98b47..8fe95cb695 100644 --- a/lib/rdoc/generator/template/darkfish/css/rdoc.css +++ b/lib/rdoc/generator/template/darkfish/css/rdoc.css @@ -96,6 +96,8 @@ main .anchor-link:target { a { color: var(--link-color); transition: color 0.3s ease; + text-decoration: underline; + text-underline-offset: 2px; /* Make sure it doesn't overlap with underscores in a method name. */ } a:hover { From f7304352e7cef3af97e53ed03a1ab4c82d0f5ccd Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Tue, 29 Apr 2025 16:31:18 +0900 Subject: [PATCH 2/2] Increase `text-underline-offset` value with `em` unit --- lib/rdoc/generator/template/darkfish/css/rdoc.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rdoc/generator/template/darkfish/css/rdoc.css b/lib/rdoc/generator/template/darkfish/css/rdoc.css index 8fe95cb695..c84a604c8c 100644 --- a/lib/rdoc/generator/template/darkfish/css/rdoc.css +++ b/lib/rdoc/generator/template/darkfish/css/rdoc.css @@ -97,7 +97,7 @@ a { color: var(--link-color); transition: color 0.3s ease; text-decoration: underline; - text-underline-offset: 2px; /* Make sure it doesn't overlap with underscores in a method name. */ + text-underline-offset: 0.2em; /* Make sure it doesn't overlap with underscores in a method name. */ } a:hover {