]> source.dussan.org Git - gitea.git/commitdiff
avoid hard-coding height in language dropdown menu (#25986)
authorEarl Warren <109468362+earl-warren@users.noreply.github.com>
Wed, 19 Jul 2023 21:30:57 +0000 (23:30 +0200)
committerGitHub <noreply@github.com>
Wed, 19 Jul 2023 21:30:57 +0000 (23:30 +0200)
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: rome-user <rome-user@noreply.codeberg.org>
Co-authored-by: Giteabot <teabot@gitea.io>
web_src/css/home.css

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