rustdoc: js: change color and reduce size of typename in search result

This commit is contained in:
Alexis (Poliorcetics) Bourget 2023-06-16 23:18:57 +02:00
parent 689511047a
commit 1a94b06089
2 changed files with 7 additions and 1 deletions

View File

@ -890,6 +890,10 @@ so that we can apply CSS-filters to change the arrow color in themes */
.search-results .result-name .grey {
color: var(--search-results-grey-color);
}
.search-results .result-name .typename {
color: var(--search-results-grey-color);
font-size: 0.875rem;
}
.popover {
position: absolute;

View File

@ -2024,7 +2024,9 @@ function initSearch(rawSearchIndex) {
resultName.insertAdjacentHTML(
"beforeend",
`${typeName} ${item.displayPath}<span class="${type}">${name}</span>`);
`<span class="typename">${typeName}</span>`
+ ` ${item.displayPath}<span class="${type}">${name}</span>`
);
link.appendChild(resultName);
const description = document.createElement("div");