Skip to content

Build your personal knowledge base with Trilium Notes

fix(quick_search): fit the results to a phone's screen and widen them on tablets

Elian Doran08f6073ee945
diff --git a/apps/client/src/layouts/mobile_layout.css b/apps/client/src/layouts/mobile_layout.css
index 3274759e07..7e0c63d244 100644
--- a/apps/client/src/layouts/mobile_layout.css
+++ b/apps/client/src/layouts/mobile_layout.css
@@ -23,7 +23,4 @@ kbd {
.quick-search {
margin: 0;
}
-:root .dropdown-menu.quick-search-menu {
- max-width: 350px;
-}
diff --git a/apps/client/src/widgets/quick_search.css b/apps/client/src/widgets/quick_search.css
index e605d9fa00..b63c41f595 100644
--- a/apps/client/src/widgets/quick_search.css
+++ b/apps/client/src/widgets/quick_search.css
@@ -122,8 +122,8 @@
/* A fixed popup is otherwise as wide as the room right of its `left`, so each pass of `shift()`
away from the viewport's edge widens it, and the next pass moves it again. */
width: max-content;
- min-width: 400px;
/* The 10px are the 5px `Popup` keeps from each edge of the viewport. */
+ min-width: min(400px, calc(100vw - 10px));
max-width: min(720px, calc(100vw - 10px));
overflow: hidden;
text-overflow: ellipsis;