mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 03:42:17 +00:00
Improve search result keyboard styling
This commit is contained in:
parent
0bf5c0aa59
commit
9662b4b11d
2 changed files with 10 additions and 11 deletions
|
@ -148,9 +148,13 @@
|
||||||
// De-focus and clear input box
|
// De-focus and clear input box
|
||||||
searchBox.value = "";
|
searchBox.value = "";
|
||||||
searchBox.blur();
|
searchBox.blur();
|
||||||
} else if (searchTypeAhead.contains(document.activeElement)) {
|
} else {
|
||||||
|
// Hide the search results
|
||||||
searchTypeAhead.classList.add("hidden");
|
searchTypeAhead.classList.add("hidden");
|
||||||
searchBox.focus();
|
|
||||||
|
if (searchTypeAhead.contains(document.activeElement)) {
|
||||||
|
searchBox.focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -481,6 +481,10 @@ pre>samp {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#module-search:focus {
|
||||||
|
outline: 2px solid var(--faded-color);
|
||||||
|
}
|
||||||
|
|
||||||
#search-type-ahead {
|
#search-type-ahead {
|
||||||
font-family: var(--font-mono);
|
font-family: var(--font-mono);
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -532,20 +536,11 @@ pre>samp {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
#search-type-ahead:hover li:focus-within a:focus {
|
|
||||||
background: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#search-type-ahead a:focus {
|
#search-type-ahead a:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
background: var(--violet-bg);
|
background: var(--violet-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
#search-type-ahead a:hover {
|
|
||||||
background: var(--violet-bg) !important;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#search-link {
|
#search-link {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: none;
|
display: none;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue