avoid hard-coding height in language dropdown menu (#25986) (#25997)

Backport #25986 by @earl-warren

This commit removes the hard-coded height of 500px, using that as a
max-height instead. The height of items in the dropdown menu, assuming a
default font size of 16px, is 36px, so the old CSS would cause overly
large dropdown menus in instances where less than 14 languages are
offered.

Refs: https://codeberg.org/forgejo/forgejo/pulls/1000

Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com>
Co-authored-by: rome-user <rome-user@noreply.codeberg.org>
(cherry picked from commit 28e8c691a6e021e755e33c066c26edf36bf08125)
This commit is contained in:
Giteabot 2023-07-19 19:05:22 -04:00 committed by Earl Warren
parent f890856cf4
commit 321909de7e
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -74,8 +74,7 @@
} }
.page-footer .ui.dropdown.language .menu { .page-footer .ui.dropdown.language .menu {
height: 500px; max-height: min(500px, calc(100vh - 60px));
max-height: calc(100vh - 60px);
overflow-y: auto; overflow-y: auto;
margin-bottom: 10px; margin-bottom: 10px;
} }