fix(ui): misc ui fixes (#39336)

1. Give menu items an inset pill highlight, text position and menu width are unchanged in most menus
1. Add arrow key, Enter, Space and Escape handling to all tippy menus
1. Mark the keyboard cursor of fomantic and tippy menus with the focus ring instead of the hover background
1. Mark the current dropdown item with the active color so it stands out from the hovered one
1. Stop navbar dropdown links from taking the navbar item hover color
1. Replace the actions job log options dropdown with the shared tippy menu, its hover highlight was invisible
1. Stop changing font weight on active and selected menu items, it resized rows while arrowing
1. Stretch the "All extensions" button in the diff file extension filter to the full menu width
1. Fix the actions run summary block covering the panel's rounded corners and indenting wrapped stats
This commit is contained in:
silverwind
2026-09-25 00:01:09 +00:00
committed by GitHub
parent f757631a47
commit 7f3b4a0bdd
17 changed files with 187 additions and 218 deletions
+15 -24
View File
@@ -18,7 +18,7 @@
top: 100%;
min-width: max-content;
margin: 0;
padding: 0;
padding: 4px 0;
background: var(--color-menu);
font-size: 1em;
text-align: left;
@@ -69,7 +69,10 @@
line-height: var(--line-height-default);
font-size: 1rem;
color: var(--color-text);
padding: 0.78571429rem 1.14285714rem !important;
width: calc(100% - 8px); /* button items do not stretch on their own */
margin: 0 4px;
padding: 0.78571429rem 0.85714286rem !important; /* 12px, the margin adds the remaining 4px */
border-radius: var(--border-radius);
text-transform: none;
font-weight: var(--font-weight-normal);
box-shadow: none;
@@ -211,6 +214,7 @@ select.ui.dropdown {
border-top-width: 0 !important;
outline: none;
margin: 0 -1px;
padding: 0;
min-width: calc(100% + 2px);
width: calc(100% + 2px);
border-radius: 0 0 0.28571429rem 0.28571429rem;
@@ -252,15 +256,14 @@ select.ui.dropdown {
.ui.selection.dropdown .menu > .item {
border-top: 1px solid var(--color-secondary);
width: 100%;
margin: 0;
padding: 0.78571429rem 1.14285714rem !important;
border-radius: 0;
white-space: normal;
overflow-wrap: normal;
}
.ui.selection.dropdown .menu .item:first-of-type {
border-radius: 0;
}
.ui.selection.dropdown .menu > .hidden.addition.item {
display: none;
}
@@ -505,7 +508,11 @@ select.ui.dropdown {
color: var(--color-text);
box-shadow: none;
z-index: 12;
border-radius: 0;
}
.ui.dropdown.keyboard-nav .menu .selected.item {
outline: 2px solid var(--color-primary);
outline-offset: -2px;
}
.ui.dropdown .menu > .item:hover {
@@ -579,7 +586,7 @@ select.ui.dropdown {
.ui.dropdown .menu .selected.item {
color: var(--color-text);
background: var(--color-hover);
background: var(--color-active);
}
.ui.dropdown > .filtered.text {
@@ -821,18 +828,6 @@ select.ui.dropdown {
margin-right: 0.78571429rem;
}
.ui.dropdown .menu .item {
border-radius: 0;
}
.ui.dropdown .menu .item:first-of-type {
border-radius: var(--border-radius) var(--border-radius) 0 0;
}
.ui.dropdown .menu .item:last-of-type {
border-radius: 0 0 var(--border-radius) var(--border-radius);
}
/* Gitea uses SVG images instead of Fomantic builtin "<i>" font icons, so we need to reset the icon styles */
.ui.ui.dropdown > .icon.icon {
position: initial;
@@ -897,10 +892,6 @@ select.ui.dropdown {
max-width: 80vw;
}
.scrolling.menu .item.selected {
font-weight: var(--font-weight-semibold) !important;
}
/* to override Fomantic's default display: block for ".menu .item", and use a slightly larger gap for menu item content
the "!important" is necessary to override Fomantic UI menu item styles, meanwhile we should keep the "hidden" items still hidden */
.ui.dropdown .menu.flex-items-menu > .item:not(.hidden, .filtered, .tw-hidden) {