Skip to content

Commit 1c888d5

Browse files
committed
rustdoc: Fix gap on section anchor symbol when hovering.
Fixes #49485 for section headings.
1 parent 545f223 commit 1c888d5

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
@@ -545,10 +545,8 @@ a {
545545
left: -5px;
546546
}
547547
.small-section-header > .anchor {
548-
left: -20px;
549-
}
550-
.small-section-header > .anchor:not(.field) {
551548
left: -28px;
549+
padding-right: 10px; /* avoid gap that causes hover to disappear */
552550
}
553551
.anchor:before {
554552
content: '\2002\00a7\2002';
@@ -745,6 +743,7 @@ a.test-arrow:hover{
745743
.section-header:hover a:before {
746744
position: absolute;
747745
left: -25px;
746+
padding-right: 10px; /* avoid gap that causes hover to disappear */
748747
content: '\2002\00a7\2002';
749748
}
750749

0 commit comments

Comments
 (0)