diff --git a/app/components/autocomplete_component/autocomplete_component.html.erb b/app/components/autocomplete_component/autocomplete_component.html.erb index 335bad548..1c29a8eb5 100644 --- a/app/components/autocomplete_component/autocomplete_component.html.erb +++ b/app/components/autocomplete_component/autocomplete_component.html.erb @@ -13,7 +13,7 @@ <% end %> <% if result.post_count %> - <%= tag.span humanized_number(result.post_count), class: "post-count", style: "float: right;" %> + <%= tag.span humanized_number(result.post_count), class: "post-count" %> <% end %> <% end %> diff --git a/app/javascript/src/styles/common/autocomplete.scss b/app/javascript/src/styles/common/autocomplete.scss index d1a818596..dafca55de 100644 --- a/app/javascript/src/styles/common/autocomplete.scss +++ b/app/javascript/src/styles/common/autocomplete.scss @@ -2,22 +2,29 @@ font-size: var(--text-sm); border: 1px solid var(--autocomplete-border-color); box-shadow: var(--shadow-lg); + max-width: 480px; div.ui-menu-item-wrapper { padding: 0.25em 0.4em; border: none; + display: flex; &.ui-state-active { cursor: pointer; background-color: var(--autocomplete-selected-background-color); } + > a { + flex-grow: 1; + } + span.autocomplete-arrow { color: var(--text-color); } span.post-count { margin-left: 1em; + align-self: center; } }