mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-27 02:56:25 +00:00
fix(ui): avoid layout shifts in overflow-menu and repo filter (#37818)
Eliminate two layout shifts in the menu, one related to non-existant label on page load and one to `0` value rendering. Signed-off-by: silverwind <me@silverwind.io> Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com> Co-authored-by: bircni <bircni@icloud.com>
This commit is contained in:
@@ -522,6 +522,11 @@ overflow-menu {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* hide until JS has arranged the items, so the un-collapsed menu is never painted */
|
||||
overflow-menu:not([data-ready]) {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
overflow-menu .overflow-menu-popup {
|
||||
position: absolute;
|
||||
top: calc(100% + 8px);
|
||||
@@ -609,6 +614,12 @@ overflow-menu .overflow-menu-button:hover {
|
||||
|
||||
overflow-menu .ui.label {
|
||||
margin-left: 7px !important; /* save some space */
|
||||
font-variant-numeric: tabular-nums; /* equal-width digits so counts don't reflow the row */
|
||||
}
|
||||
|
||||
/* count not loaded yet, keep the reserved space so filling it in does not shift the row */
|
||||
overflow-menu .ui.label:empty {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.activity-bar-graph {
|
||||
|
||||
Reference in New Issue
Block a user