Skip to content

Commit 1a94b06

Browse files
committed
rustdoc: js: change color and reduce size of typename in search result
1 parent 6895110 commit 1a94b06

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

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

+4
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,10 @@ so that we can apply CSS-filters to change the arrow color in themes */
890890
.search-results .result-name .grey {
891891
color: var(--search-results-grey-color);
892892
}
893+
.search-results .result-name .typename {
894+
color: var(--search-results-grey-color);
895+
font-size: 0.875rem;
896+
}
893897

894898
.popover {
895899
position: absolute;

src/librustdoc/html/static/js/search.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -2024,7 +2024,9 @@ function initSearch(rawSearchIndex) {
20242024

20252025
resultName.insertAdjacentHTML(
20262026
"beforeend",
2027-
`${typeName} ${item.displayPath}<span class="${type}">${name}</span>`);
2027+
`<span class="typename">${typeName}</span>`
2028+
+ ` ${item.displayPath}<span class="${type}">${name}</span>`
2029+
);
20282030
link.appendChild(resultName);
20292031

20302032
const description = document.createElement("div");

0 commit comments

Comments
 (0)