mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
Show all search results, each with max of 3 lines
This commit is contained in:
parent
9662b4b11d
commit
956d07f179
2 changed files with 8 additions and 6 deletions
|
@ -96,11 +96,7 @@
|
||||||
?.textContent?.toLowerCase()
|
?.textContent?.toLowerCase()
|
||||||
?.replace(/\s+/g, "");
|
?.replace(/\s+/g, "");
|
||||||
|
|
||||||
if (
|
if ((entryName.includes(text) || entrySignature?.includes(text.replace(/\s+/g, "")))) {
|
||||||
totalResults < 5 &&
|
|
||||||
(entryName.includes(text) ||
|
|
||||||
entrySignature?.includes(text.replace(/\s+/g, "")))
|
|
||||||
) {
|
|
||||||
totalResults++;
|
totalResults++;
|
||||||
entry.classList.remove("hidden");
|
entry.classList.remove("hidden");
|
||||||
if (topSearchResultListItem === undefined) {
|
if (topSearchResultListItem === undefined) {
|
||||||
|
|
|
@ -509,13 +509,19 @@ pre>samp {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
line-height: 2em;
|
line-height: 2em;
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
|
|
||||||
|
max-height: 6em;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 3;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
|
||||||
/* if it wraps, indent after the first line */
|
/* if it wraps, indent after the first line */
|
||||||
padding-left: calc(2em + 8px);
|
padding-left: calc(2em + 8px);
|
||||||
text-indent: -2em;
|
text-indent: -2em;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue