Doc search improvements (#24567)

- `/` is now a hotkey to jump to the search
- Search results now are in line with the page (previously on small
screens it would be off centre)
- Jumping to a search result inside the page or via TOC will now hide
the search results (previously the results got in the way)

Example site here: https://tranquil-scone-c159b6.netlify.app/main.html
This commit is contained in:
Jake Leahy
2024-12-26 00:19:22 +11:00
committed by GitHub
parent 5b9ff963c5
commit 86d6f71f5a
3 changed files with 48 additions and 26 deletions

View File

@@ -770,11 +770,10 @@ div.topic {
div.search_results {
background-color: var(--third-background);
margin: 3vh 5vw;
padding: 1em;
border: 1px solid #4d4d4d;
position: fixed;
top: 10px;
position: sticky;
top: 1em;
isolation: isolate;
max-width: calc(100vw - 6em);
z-index: 1;