Skip to content

Commit dc24f02

Browse files
Fix anchors display in rustdoc
1 parent 896f058 commit dc24f02

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/librustdoc/html/static/css/rustdoc.css

+9-5
Original file line numberDiff line numberDiff line change
@@ -735,17 +735,21 @@ a {
735735
.anchor {
736736
display: none;
737737
position: absolute;
738-
left: -7px;
738+
left: 0;
739+
background: none !important;
739740
}
740741
.anchor.field {
741742
left: -5px;
742743
}
743744
.small-section-header > .anchor {
744-
left: -28px;
745-
padding-right: 10px; /* avoid gap that causes hover to disappear */
745+
left: -15px;
746+
padding-right: 8px;
746747
}
747-
.anchor:before {
748-
content: '\2002\00a7\2002';
748+
h2.small-section-header > .anchor {
749+
padding-right: 6px;
750+
}
751+
.anchor::before {
752+
content: '§';
749753
}
750754

751755
.docblock a:not(.srclink):not(.test-arrow):hover,

0 commit comments

Comments
 (0)