Skip to content

Build your personal knowledge base with Trilium Notes

style/quick search results: refactor

Adorian Doran620b57bfa6eb
diff --git a/apps/client/src/stylesheets/style.css b/apps/client/src/stylesheets/style.css
index 5b679cf537..a8a130341d 100644
--- a/apps/client/src/stylesheets/style.css
+++ b/apps/client/src/stylesheets/style.css
@@ -2349,14 +2349,6 @@ footer.webview-footer button {
padding: 1px 10px 1px 10px;
}
-/* Search result highlighting */
-.search-result-title b,
-.search-result-content b,
-.search-result-attributes b {
- color: var(--admonition-warning-accent-color);
- text-decoration: underline;
-}
-
/* Customized icons */
.bx-tn-toc::before {
diff --git a/apps/client/src/stylesheets/theme-next/shell.css b/apps/client/src/stylesheets/theme-next/shell.css
index 7f8c692f6d..ff3fd5e9e3 100644
--- a/apps/client/src/stylesheets/theme-next/shell.css
+++ b/apps/client/src/stylesheets/theme-next/shell.css
@@ -586,6 +586,10 @@ div.quick-search .search-button.show {
top: 1px;
}
+.quick-search .quick-search-item-icon {
+ vertical-align: text-bottom;
+}
+
/* Note title */
.quick-search .dropdown-menu .dropdown-item > a {
color: var(--menu-text-color);
@@ -604,15 +608,13 @@ div.quick-search .search-button.show {
overflow: hidden;
}
-.quick-search .quick-search-item-icon {
- vertical-align: text-bottom;
-}
-
+/* Note content snippet */
:root .quick-search .search-result-content {
background-color: var(--quick-search-result-content-background);
border-radius: 4px;
}
+/* Divider line */
.quick-search .dropdown-item::after {
display: none;
}
diff --git a/apps/client/src/widgets/quick_search.ts b/apps/client/src/widgets/quick_search.ts
index ea2df5f466..74124aff44 100644
--- a/apps/client/src/widgets/quick_search.ts
+++ b/apps/client/src/widgets/quick_search.ts
@@ -98,6 +98,14 @@ const TPL = /*html*/`
font-size: .85em;
}
+ /* Search result highlighting */
+ .quick-search .search-result-title b,
+ .quick-search .search-result-content b,
+ .quick-search .search-result-attributes b {
+ color: var(--admonition-warning-accent-color);
+ text-decoration: underline;
+ }
+
.quick-search .dropdown-divider {
margin: 0;
}