Skip to content

Build your personal knowledge base with Trilium Notes

style(autocomplete): give a note's title the room it needs before its path

Elian Doran0918d416a5c1
diff --git a/apps/client/src/widgets/react/NoteAutocomplete.css b/apps/client/src/widgets/react/NoteAutocomplete.css
index 486f73dcf1..9e94eb061b 100644
--- a/apps/client/src/widgets/react/NoteAutocomplete.css
+++ b/apps/client/src/widgets/react/NoteAutocomplete.css
@@ -81,8 +81,8 @@
/*
* The title, then the path to the note at the end of the same line, as the search results' cards
- * set them. Short of room, the path gives way four times as fast as the title, which wraps within
- * what is left, and the path is cut short.
+ * set them. The title takes the room it needs and the path what is left, cut short; the title
+ * wraps only where it would leave the path less than its minimum.
*/
.note-suggestion-header {
display: flex;
@@ -96,9 +96,9 @@
}
.note-suggestion-path {
- flex: 0 4 auto;
+ flex: 1 0 0;
min-width: min(25%, 8em);
- margin-inline-start: auto;
+ text-align: end;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@@ -113,10 +113,7 @@
*/
body:not([dir=rtl]) & .note-suggestion-path {
direction: rtl;
- /* Logical margins follow the box's own direction, so its inline end is the line's left. */
- margin-inline: 0 auto;
- /* A short path in a box held wider by its minimum ends at the right, against the menu's
- inherited `text-align: left`. */
+ /* At the line's end, which in the box's own direction is its start. */
text-align: right;
> span {