Files
gitea/web_src/css/shared/flex-list.css
silverwind 2e96e8227f style: misc UI fixes (#37691)
- Action view sidebar: rename `job-brief-item` to
`action-view-sidebar-item`, fix trash icon overflow on long artifact
names, align artifact and workflow hover styles with the jobs list
- Branches: expand new PR button cell to three wide so the button is not
clipped on narrow viewports
- Dashboard feed: add `tw-max-w-full` so long issue titles truncate
- Reactions: tighten label padding

<img width="261" height="65" alt="Screenshot 2026-05-13 at 16 18 33"
src="https://github.com/user-attachments/assets/ecfe8f37-4a65-4839-b8c0-defccc85482c"
/>
<img width="154" height="126" alt="Screenshot 2026-05-13 at 16 19 25"
src="https://github.com/user-attachments/assets/41302134-d1b7-401a-be2d-79173adb6d17"
/>
<img width="405" height="378" alt="Screenshot 2026-05-13 at 16 47 18"
src="https://github.com/user-attachments/assets/e2c5cdd4-f11d-498c-b17e-c74c80c0ddf7"
/>
<img width="206" height="149" alt="Screenshot 2026-05-13 at 16 55 53"
src="https://github.com/user-attachments/assets/7787125d-04b1-4500-b9b8-2637845509d6"
/>
<img width="858" height="135" alt="Screenshot 2026-05-13 at 16 58 41"
src="https://github.com/user-attachments/assets/cb5bdf56-3891-469d-aa77-ea38855958c1"
/>
<img width="434" height="128" alt="Screenshot 2026-05-13 at 17 00 43"
src="https://github.com/user-attachments/assets/60f2c34d-b345-4813-8f6d-a95bf51021b4"
/>



---
This PR was written with the help of Claude Opus 4.7

---------

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-05-21 07:02:05 +00:00

127 lines
2.7 KiB
CSS

/* can be used to replace "ui relaxed list" or "tw-flex tw-flex-col tw-gap-xxx" when we need more flexible layout */
.flex-relaxed-list {
display: flex;
flex-direction: column;
gap: var(--gap-block);
}
.flex-relaxed-list > .divider {
margin: 0;
}
/* items have dividers between them, the dividers align with items */
.flex-divided-list,
.flex-divided-list > .item.flex-divided-list {
display: flex;
flex-direction: column;
align-items: stretch;
gap: 0;
}
.flex-divided-list > .item {
padding: 10px 0;
}
.flex-divided-list > .divider {
margin: 0;
}
.flex-divided-list > .item + .item {
border-top: 1px solid var(--color-secondary);
}
.items-with-main > .item {
display: flex;
gap: 8px;
align-items: flex-start;
}
.items-with-main > .item .item-leading {
display: flex;
align-items: flex-start;
}
.items-with-main > .item .item-main {
display: flex;
flex-direction: column;
gap: 0.25em;
flex-grow: 1;
flex-basis: 60%; /* avoid wrapping the "item-trailing" too aggressively */
min-width: 0; /* make the "text truncate" work, otherwise the flex axis is not limited and the text just overflows */
}
.items-with-main > .item .item-header {
display: flex;
gap: .25rem;
justify-content: space-between;
flex-wrap: wrap;
}
.items-with-main > .item a:not(.label, .button):hover {
color: var(--color-primary) !important;
}
.items-with-main > .item .item-trailing {
display: flex;
gap: 0.5rem;
align-items: center;
flex-grow: 0;
flex-wrap: wrap;
justify-content: end;
}
.items-with-main > .item .item-title {
display: inline-flex;
flex-wrap: wrap;
align-items: center;
gap: var(--gap-inline);
max-width: 100%;
color: var(--color-text);
font-size: 16px;
font-weight: var(--font-weight-semibold);
overflow-wrap: anywhere;
min-width: 0;
}
.items-with-main > .item .item-title a {
color: var(--color-text);
overflow-wrap: anywhere;
}
.items-with-main > .item .item-body {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: .25rem;
color: var(--color-text-light-2);
overflow-wrap: anywhere;
}
.items-with-main > .item .item-body a {
color: inherit;
overflow-wrap: anywhere;
}
/* special rules to make the list work with existing UI elements */
.flex-divided-list.items-px-default > .item {
padding-left: 1em; /* matches ".ui.segment" padding */
padding-right: 1em;
}
.ui.segment:not(.fitted) > .flex-divided-list > .item:first-child {
padding-top: 0;
}
.ui.segment:not(.fitted) > .flex-divided-list > .item:last-child {
padding-bottom: 0;
}
/* If there is a divider besides the flex-list, some padding/margin are not needs */
.divider + .flex-divided-list > .item:first-child {
padding-top: 0;
}
.flex-divided-list + .divider {
margin-top: 0;
}