fix(style): search preview consistency
This commit is contained in:
parent
50bb1ffd8a
commit
e1f12e6cb7
@ -20,8 +20,8 @@ type SearchType = "basic" | "tags"
|
|||||||
let searchType: SearchType = "basic"
|
let searchType: SearchType = "basic"
|
||||||
|
|
||||||
const contextWindowWords = 30
|
const contextWindowWords = 30
|
||||||
const numSearchResults = 5
|
const numSearchResults = 8
|
||||||
const numTagResults = 3
|
const numTagResults = 5
|
||||||
function highlight(searchTerm: string, text: string, trim?: boolean) {
|
function highlight(searchTerm: string, text: string, trim?: boolean) {
|
||||||
// try to highlight longest tokens first
|
// try to highlight longest tokens first
|
||||||
const tokenizedTerms = searchTerm
|
const tokenizedTerms = searchTerm
|
||||||
|
@ -91,12 +91,22 @@
|
|||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
border: 1px solid var(--lightgray);
|
||||||
|
|
||||||
& > * {
|
& > div {
|
||||||
height: calc(75vh - 20em);
|
height: calc(75vh - 20em);
|
||||||
background: none;
|
background: none;
|
||||||
border-radius: 5px;
|
|
||||||
border: 1px solid var(--lightgray); // Border to define the box
|
&:first-child {
|
||||||
|
border-top-left-radius: 5px;
|
||||||
|
border-bottom-left-radius: 5px;
|
||||||
|
border-right: 1px solid var(--lightgray);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border-top-right-radius: 5px;
|
||||||
|
border-bottom-right-radius: 5px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (max-width: $mobileBreakpoint) {
|
@media all and (max-width: $mobileBreakpoint) {
|
||||||
@ -122,7 +132,6 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
font-size: 1.1em;
|
|
||||||
color: var(--dark);
|
color: var(--dark);
|
||||||
line-height: 1.5em;
|
line-height: 1.5em;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@ -141,6 +150,7 @@
|
|||||||
padding: 1em;
|
padding: 1em;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background 0.2s ease;
|
transition: background 0.2s ease;
|
||||||
|
border-bottom: 1px solid var(--lightgray);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: block;
|
display: block;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
Loading…
Reference in New Issue
Block a user