about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-08-04 11:32:36 +0200
committerGitHub <noreply@github.com>2024-08-04 11:32:36 +0200
commitbadf983c96e9ec7951eccc3915c18c27a2a39142 (patch)
treee132c3b630bed8e6d78212b351b2513e4f7b6e0a
parentad5b9c24c0103671f434f4fac654cecc0197656e (diff)
parenteb2de64aa1cb0d3eded99458566e8eee8333a751 (diff)
Rollup merge of #128615 - notriddle:notriddle/anchor-a11y, r=GuillaumeGomez
rustdoc: make the hover trail for doc anchors a bit bigger

https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/Weird.20markdown.20heading.20rendering.3F

r? ```@GuillaumeGomez```

### Screenshots (the purple part is the padding, which the mouse can pass through to hover over it)

| Before | After |
|--|--|
| ![image](https://github.com/user-attachments/assets/5070eebe-84ac-4f5d-8950-58664370191c) | ![image](https://github.com/user-attachments/assets/55340161-ad8a-41bd-a120-8cdab11f4af0)
-rw-r--r--src/librustdoc/html/static/css/rustdoc.css2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index f4e231327a8..02a6bb8f548 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -930,7 +930,7 @@ a.doc-anchor {
 	left: -17px;
 	/* We add this padding so that when the cursor moves from the heading's text to the anchor,
 	   the anchor doesn't disappear. */
-	padding-right: 5px;
+	padding-right: 10px;
 	/* And this padding is used to make the anchor larger and easier to click on. */
 	padding-left: 3px;
 }