mirror of
https://github.com/mudler/LocalAI.git
synced 2026-10-28 09:08:54 -04:00
fix(ui): keep the language switcher menu inside the viewport
The menu opens upwards from the sidebar footer and is a child of the scrollable sidebar. On short windows it was taller than the space above the trigger, so its top (the first entries) was clipped by the sidebar. Cap the menu height to the viewport and let it scroll instead. Signed-off-by: gangna2s-arch <281744444+gangna2s-arch@users.noreply.github.com>
This commit is contained in:
1 parent
7f7b10fba9
commit
9a564ef79d
1 file changed
+6
@@ -708,6 +708,12 @@
|
||||
bottom: calc(100% + 8px);
|
||||
left: 0;
|
||||
min-width: 220px;
|
||||
/* The menu opens upwards from the sidebar footer, inside a scrollable
|
||||
sidebar. Cap its height to the viewport so it stays within the sidebar
|
||||
box instead of being clipped at the top on short windows. */
|
||||
max-height: calc(100dvh - 64px);
|
||||
overflow-y: auto;
|
||||
overscroll-behavior: contain;
|
||||
background: var(--color-surface-float);
|
||||
border: 1px solid var(--color-border-card);
|
||||
border-radius: var(--radius-lg);
|
||||
|
||||
Reference in new issue
Block a user