Skip to content

Build your personal knowledge base with Trilium Notes

client/quick search results: refactor the item delimiter line

Adorian Doran43caadc472c3
diff --git a/apps/client/src/stylesheets/theme-next/shell.css b/apps/client/src/stylesheets/theme-next/shell.css
index a6e31de5d4..681d2acf5e 100644
--- a/apps/client/src/stylesheets/theme-next/shell.css
+++ b/apps/client/src/stylesheets/theme-next/shell.css
@@ -575,6 +575,10 @@ div.quick-search .search-button.show {
* Quick search results
*/
+div.quick-search .dropdown-menu {
+ --quick-search-item-delimiter-color: transparent;
+}
+
/* Item */
.quick-search .dropdown-menu *.dropdown-item {
padding: 8px 12px !important;
@@ -622,11 +626,6 @@ div.quick-search .search-button.show {
font-weight: 600;
}
-/* Divider line */
-.quick-search .dropdown-item::after {
- display: none;
-}
-
/*
* TREE PANE
*/
diff --git a/apps/client/src/widgets/quick_search.ts b/apps/client/src/widgets/quick_search.ts
index 95728b99e0..8b926c4955 100644
--- a/apps/client/src/widgets/quick_search.ts
+++ b/apps/client/src/widgets/quick_search.ts
@@ -15,13 +15,15 @@ const TPL = /*html*/`
padding: 10px 10px 10px 0px;
height: 50px;
}
-
+
.quick-search button, .quick-search input {
border: 0;
font-size: 100% !important;
}
-
+
.quick-search .dropdown-menu {
+ --quick-search-item-delimiter-color: var(--dropdown-border-color);
+
max-height: 80vh;
min-width: 400px;
max-width: 720px;
@@ -38,14 +40,14 @@ const TPL = /*html*/`
position: relative;
}
- .quick-search .dropdown-item:not(:last-child)::after {
+ .quick-search .dropdown-item + .dropdown-item::after {
content: '';
position: absolute;
left: 0;
- bottom: 0;
+ top: 0;
width: 100%;
height: 1px;
- background: var(--dropdown-border-color);
+ border-bottom: 1px solid var(--quick-search-item-delimiter-color);
}
.quick-search .dropdown-item:last-child::after {