search key nav fixes
All checks were successful
Build Roam Site / build (push) Successful in 32s

This commit is contained in:
2026-05-14 14:51:09 +01:00
parent 74449c345a
commit ccdd229a7d
332 changed files with 407 additions and 149 deletions

0
assets/styles/bigger-picture.min.css vendored Normal file → Executable file
View File

0
assets/styles/cookbook.css Normal file → Executable file
View File

0
assets/styles/media.css Normal file → Executable file
View File

0
assets/styles/org.css Normal file → Executable file
View File

View File

@@ -174,48 +174,175 @@ body, p, li, td, th, span, div {
}
/* Search */
.banner-search { position: relative; max-width: 18rem; }
.banner-search {
position: relative;
flex: 0 0 auto;
}
#search-box {
width: 100%;
padding: 0.35rem 0.7rem;
font-size: 0.8rem;
.search-trigger {
display: inline-flex;
align-items: center;
justify-content: space-between;
gap: 1.75rem;
min-width: 11rem;
height: 30px;
padding: 0 0.45rem 0 0.7rem;
font-size: 0.78rem;
font-family: var(--font-body);
color: var(--fg-dim);
background: var(--surface);
color: var(--fg);
border: 1px solid var(--border);
border-radius: 5px;
outline: none;
transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
cursor: pointer;
transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast), box-shadow var(--dur-fast);
}
#search-box:focus {
.search-trigger:hover,
.search-trigger:focus-visible {
color: var(--fg);
border-color: var(--accent-dim);
background: var(--surface-2);
box-shadow: 0 0 0 3px var(--accent-sub);
outline: none;
}
#search-box::placeholder { color: var(--fg-faint); font-style: italic; }
#search-results {
position: absolute;
top: calc(100% + 6px); left: 0; right: 0;
.search-trigger kbd {
min-width: 1.25rem;
height: 1.25rem;
display: inline-flex;
align-items: center;
justify-content: center;
font: 0.7rem var(--font-mono);
color: var(--fg-faint);
background: var(--bg);
border: 1px solid var(--border-2);
border-radius: 6px;
box-shadow: 0 16px 48px rgba(0,0,0,0.5);
max-height: 20rem;
overflow-y: auto;
z-index: 1000;
border-radius: 4px;
}
#search-results > * {
padding: 0.5rem 0.75rem;
font-size: 0.82rem;
line-height: 1.4;
cursor: pointer;
.search-modal[hidden] { display: none; }
.search-modal {
position: fixed;
inset: 0;
z-index: 1200;
}
.search-backdrop {
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.58);
backdrop-filter: blur(3px);
}
.search-dialog {
position: relative;
min-height: 100%;
display: grid;
place-items: center;
padding: 1rem;
}
.search-panel {
width: min(42rem, calc(100vw - 2rem));
max-height: min(34rem, calc(100dvh - 4rem));
overflow: hidden;
background: var(--bg);
border: 1px solid var(--border-2);
border-radius: 8px;
box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58);
}
.search-input-wrap {
display: flex;
align-items: center;
gap: 0.6rem;
padding: 0.75rem;
border-bottom: 1px solid var(--border);
transition: background var(--dur-fast);
}
#search-results > *:last-child { border-bottom: none; }
#search-results > *:hover,
#search-results > *.active { background: var(--accent-sub); color: var(--fg); }
.search-icon {
flex: 0 0 auto;
color: var(--accent);
font-size: 1rem;
}
#search-box {
width: 100%;
min-width: 0;
padding: 0.35rem 0;
font-size: 1rem;
font-family: var(--font-body);
background: transparent;
color: var(--fg);
border: 0;
outline: none;
}
#search-box::placeholder { color: var(--fg-faint); }
.search-close {
flex: 0 0 auto;
width: 1.8rem;
height: 1.8rem;
display: inline-flex;
align-items: center;
justify-content: center;
color: var(--fg-dim);
background: transparent;
border: 1px solid transparent;
border-radius: 5px;
cursor: pointer;
font-size: 1.1rem;
line-height: 1;
transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast);
}
.search-close:hover,
.search-close:focus-visible {
color: var(--fg);
border-color: var(--border-2);
background: var(--surface);
outline: none;
}
.search-title {
padding: 0.55rem 0.8rem 0.4rem;
color: var(--fg-faint);
font: 0.68rem var(--font-mono);
text-transform: uppercase;
letter-spacing: 0;
}
#search-results {
max-height: min(24rem, calc(100dvh - 11rem));
overflow-y: auto;
}
.search-result {
width: 100%;
display: grid;
gap: 0.15rem;
padding: 0.62rem 0.8rem;
text-align: left;
color: var(--fg);
background: transparent;
border: 0;
border-top: 1px solid var(--border);
cursor: pointer;
transition: background var(--dur-fast), color var(--dur-fast);
}
.search-result:hover,
.search-result.active {
background: var(--accent-sub);
}
.search-result-title {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 0.88rem;
line-height: 1.35;
}
.search-result-path {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: var(--fg-faint);
font: 0.68rem var(--font-mono);
line-height: 1.35;
}
.search-empty {
padding: 1.2rem 0.8rem 1.35rem;
color: var(--fg-dim);
border-top: 1px solid var(--border);
font-size: 0.86rem;
text-align: center;
}
.search-empty[hidden] { display: none; }
/* Actions */
.banner-actions { display: flex; align-items: center; gap: var(--r2); }