Skip to content

Commit

Permalink
avoid hard-coding height in language dropdown menu (#25986)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
3 people committed Jul 19, 2023
1 parent ad4c09b commit 8833853
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions web_src/css/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8833853

Please sign in to comment.