Embedded searches are a handy way to gather or filter pieces of note content, but they look like the sidebar search widget plopped into a note. I prefer something that looks more integrated, so I use these CSS snippets to do that.
Example (the colored text comes from an unrelated snippet):
Embedded search body-style text.css
/* Style embedded search text like body text instead of small and faint.
Courtesy of sailkite: https://discord.com/channels/686053708261228577/702656734631821413/1141541070686134392
*/
.internal-query .search-result-file-matches {
color: var(--text-normal);
font-size: var(--font-text-size);
}
/* De emphasize the search terms at top of embedded searches by giving them the default style of results.
Courtesy of sailkite: https://discord.com/channels/686053708261228577/702656734631821413/1141542427069521920
*/
.internal-query .internal-query-header-title {
color: var(--text-muted);
font-size: var(--font-ui-smaller);
}
/* Remove match highlighting from embedded search.
Courtesy of trainbuffer: https://discord.com/channels/686053708261228577/702656734631821413/1141532971136983160
"And you could remove the `.internal-query` bit if you'd like to change the sidebar Search/Backlinks/etc. matched text as well. A `unset` could work here for no color"
*/
.internal-query .search-result-file-matched-text {
background-color: unset; /*default: var(--text-highlight-bg);*/
}
Embedded search edit icon visible.css
/* Make embedded search edit icon visible. This is only a problem for me on mobile, and I havent yet checked whether it's a bug or a side effect of a snippet.
Courtesy of sailkite: https://discord.com/channels/686053708261228577/702656734631821413/1141540399018676286
*/
.markdown-source-view.mod-cm6 .internal-query + .edit-block-button {
opacity: 1;
}
Embedded search unlimited height.css
/* Allow full height of embedded searches instead of limiting to a scrolling box.
Courtesy of sailKite: https://discord.com/channels/686053708261228577/702656734631821413/1141539855969550437
*/
.internal-query .search-result-container {
max-height: unset;
}
Another person’s snippet
For more options, here is another embedded search snippet: Improving embed queries integration.


