Improve search result keyboard styling

This commit is contained in:
Richard Feldman 2024-11-29 12:57:55 -05:00
parent 0bf5c0aa59
commit 9662b4b11d
No known key found for this signature in database
GPG key ID: DAC334802F365236
2 changed files with 10 additions and 11 deletions

View file

@ -148,9 +148,13 @@
// De-focus and clear input box
searchBox.value = "";
searchBox.blur();
} else if (searchTypeAhead.contains(document.activeElement)) {
} else {
// Hide the search results
searchTypeAhead.classList.add("hidden");
searchBox.focus();
if (searchTypeAhead.contains(document.activeElement)) {
searchBox.focus();
}
}
}
});

View file

@ -481,6 +481,10 @@ pre>samp {
opacity: 1;
}
#module-search:focus {
outline: 2px solid var(--faded-color);
}
#search-type-ahead {
font-family: var(--font-mono);
display: flex;
@ -532,20 +536,11 @@ pre>samp {
position: relative;
}
#search-type-ahead:hover li:focus-within a:focus {
background: none;
}
#search-type-ahead a:focus {
outline: none;
background: var(--violet-bg);
}
#search-type-ahead a:hover {
background: var(--violet-bg) !important;
text-decoration: none;
}
#search-link {
box-sizing: border-box;
display: none;