Fix trait method anchor disappearing before user can click on it

This commit is contained in:
Guillaume Gomez 2026-01-08 16:53:50 +01:00
parent bca37a20bd
commit c502d7fce0
2 changed files with 4 additions and 2 deletions

View file

@ -1200,9 +1200,11 @@ nav.sub {
display: initial;
}
.anchor {
--anchor-link-shift: 0.5em;
display: none;
position: absolute;
left: -0.5em;
left: calc(var(--anchor-link-shift) * -1);
padding-right: var(--anchor-link-shift);
background: none !important;
}
.anchor.field {

View file

@ -7,5 +7,5 @@
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
// We check that ".item-info" is bigger than its content.
move-cursor-to: ".impl"
assert-property: (".impl > a.anchor", {"offsetWidth": "8"})
assert-property: (".impl > a.anchor", {"offsetWidth": "16"})
assert-css: (".impl > a.anchor", {"left": "-8px"})