From dc24f02bc44f4a598e84e76a9269f2a972d6176d Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 6 Aug 2021 16:47:35 +0200 Subject: [PATCH] Fix anchors display in rustdoc --- src/librustdoc/html/static/css/rustdoc.css | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index bbc48f49e63..0714de9d565 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -735,17 +735,21 @@ a { .anchor { display: none; position: absolute; - left: -7px; + left: 0; + background: none !important; } .anchor.field { left: -5px; } .small-section-header > .anchor { - left: -28px; - padding-right: 10px; /* avoid gap that causes hover to disappear */ + left: -15px; + padding-right: 8px; } -.anchor:before { - content: '\2002\00a7\2002'; +h2.small-section-header > .anchor { + padding-right: 6px; +} +.anchor::before { + content: 'ยง'; } .docblock a:not(.srclink):not(.test-arrow):hover,