rustdoc: don't highlight empty elements when they are the URL target

An empty anchor like `<a id="foo"></a>` used as a jump target in docs got
the target border, which shows up as a stray orange bar.
This commit is contained in:
dualfroz committed 2026-09-29 12:01:33 +02:00
1 parent b810605da4
commit 20c0f26b00
3 files changed
+7 -1

No files matched your search

+1 -1
View File
@@ -1952,7 +1952,7 @@ instead, we check that it's not a "finger" cursor.
}
}
:target:not([data-nosnippet]) {
:target:not([data-nosnippet]):not(:empty) {
background-color: var(--target-background-color);
border-right: 3px solid var(--target-border-color);
}