Skip to content

Commit f9eef71

Browse files
Rollup merge of #53706 - ehuss:rustdoc-section-anchor, r=GuillaumeGomez
rustdoc: Fix gap on section anchor symbol when hovering. Fixes #49485 for section headings.
2 parents 91755d1 + 1c888d5 commit f9eef71

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/librustdoc/html/static/rustdoc.css

+2-3
Original file line numberDiff line numberDiff line change
@@ -558,10 +558,8 @@ a {
558558
left: -5px;
559559
}
560560
.small-section-header > .anchor {
561-
left: -20px;
562-
}
563-
.small-section-header > .anchor:not(.field) {
564561
left: -28px;
562+
padding-right: 10px; /* avoid gap that causes hover to disappear */
565563
}
566564
.anchor:before {
567565
content: '\2002\00a7\2002';
@@ -758,6 +756,7 @@ a.test-arrow:hover{
758756
.section-header:hover a:before {
759757
position: absolute;
760758
left: -25px;
759+
padding-right: 10px; /* avoid gap that causes hover to disappear */
761760
content: '\2002\00a7\2002';
762761
}
763762

0 commit comments

Comments
 (0)