mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
fix(settings): stop cropping the sidebar search placeholder
Reserve the clear button's 32px of right padding only while it renders, which leaves the placeholder 124px instead of 102px at the default sidebar width. Add text-ellipsis so longer translations end in an ellipsis rather than a sliced glyph, and hide the native WebKit search cancel button that doubled up with our own.
This commit is contained in:
@@ -165,7 +165,8 @@ defineExpose({ focusSearch })
|
||||
ref="searchInput"
|
||||
v-model="query"
|
||||
type="search"
|
||||
class="h-9 w-full min-w-0 rounded-md border border-input bg-background pl-8 pr-8 text-sm shadow-xs outline-none transition-[color,box-shadow] placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50"
|
||||
class="h-9 w-full min-w-0 overflow-hidden text-ellipsis rounded-md border border-input bg-background pl-8 text-sm shadow-xs outline-none transition-[color,box-shadow] placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [&::-webkit-search-cancel-button]:hidden"
|
||||
:class="isSearching ? 'pr-8' : 'pr-2.5'"
|
||||
:placeholder="t('settings.nav.searchPlaceholder')"
|
||||
:aria-label="t('settings.nav.searchPlaceholder')"
|
||||
data-testid="settings-nav-search"
|
||||
|
||||
Reference in New Issue
Block a user