From 9ff721ffcb56f087720a1cda36623ff6207dfc4c Mon Sep 17 00:00:00 2001 From: Dominik Reh Date: Sat, 11 Feb 2023 12:32:42 +0100 Subject: [PATCH] Fix word break behavior for new max-width change Closes #72, at least with a simple solution --- javascript/tagAutocomplete.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/javascript/tagAutocomplete.js b/javascript/tagAutocomplete.js index e37077b..b1de8d2 100644 --- a/javascript/tagAutocomplete.js +++ b/javascript/tagAutocomplete.js @@ -35,13 +35,14 @@ const autocompleteCSS = ` .autocompleteResults { position: absolute; z-index: 999; - max-width: calc(100% - 1.5em); + max-width: calc(100% - 1.5rem); margin: 5px 0 0 0; background-color: var(--results-bg) !important; border: var(--results-border-width) solid var(--results-border-color) !important; border-radius: 12px !important; overflow-y: var(--results-overflow-y); overflow-x: hidden; + word-break: break-word; } .autocompleteResultsList > li:nth-child(odd) { background-color: var(--results-bg-odd); @@ -61,15 +62,14 @@ const autocompleteCSS = ` display: flex; } .acListItem { - /*overflow: hidden; - white-space: nowrap;*/ white-space: break-spaces; + flex-shrink: 1; } .acMetaText { position: relative; text-align: end; padding: 0 0 0 15px; - flex-grow: 1; + white-space: nowrap; color: var(--meta-text-color); } .acWikiLink {