Files
gitea/web_src/css/modules/label.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

323 lines
7.4 KiB
CSS

/* based on Fomantic UI label module, with just the parts extracted that we use. If you find any
unused rules here after refactoring, please remove them. */
.ui.label {
display: inline-flex;
align-items: center;
vertical-align: middle;
gap: var(--gap-inline);
min-width: 0;
max-width: 100%;
background: var(--color-label-bg);
color: var(--color-label-text);
padding: 2px 6px;
font-size: var(--font-size-label);
font-weight: var(--font-weight-medium);
border: 0 solid transparent;
border-radius: var(--border-radius);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
a.ui.label {
cursor: pointer;
}
.ui.label > a {
cursor: pointer;
color: inherit;
opacity: 0.75;
}
.ui.label > a:hover {
opacity: 1;
}
.ui.label > img {
width: auto;
vertical-align: middle;
height: 2.1666em;
}
.ui.label > .color-icon {
margin-left: 0;
}
.ui.label > .icon {
width: auto;
margin: 0 0.75em 0 0;
}
.ui.label > .detail {
display: inline-block;
vertical-align: top;
font-weight: var(--font-weight-medium);
margin-left: 1em;
opacity: 0.8;
}
.ui.label > .detail .icon {
margin: 0 0.25em 0 0;
}
.ui.label > .close.icon,
.ui.label > .delete.icon {
cursor: pointer;
font-size: 0.92857143em;
opacity: 0.5;
}
.ui.label > .close.icon:hover,
.ui.label > .delete.icon:hover {
opacity: 1;
}
.ui.label.left.icon > .close.icon,
.ui.label.left.icon > .delete.icon {
margin: 0 0.5em 0 0;
}
.ui.label:not(.icon) > .close.icon,
.ui.label:not(.icon) > .delete.icon {
margin: 0 0 0 0.5em;
}
.ui.header > .ui.label {
margin-top: -0.29165em;
}
a.ui.label:hover {
background: var(--color-label-hover-bg);
border-color: var(--color-label-hover-bg);
color: var(--color-label-text);
}
.ui.basic.label {
background: var(--color-button);
border: 1px solid var(--color-light-border);
color: var(--color-text-light);
}
a.ui.basic.label:hover {
text-decoration: none;
color: var(--color-text);
border-color: var(--color-secondary-dark-2);
background: var(--color-hover);
}
.ui.ui.ui.primary.label {
background: var(--color-primary);
border-color: var(--color-primary-dark-2);
color: var(--color-primary-contrast);
}
a.ui.ui.ui.primary.label:hover {
background: var(--color-primary-dark-3);
border-color: var(--color-primary-dark-3);
color: var(--color-primary-contrast);
}
.ui.ui.ui.basic.primary.label {
background: transparent;
border-color: var(--color-primary);
color: var(--color-primary);
}
a.ui.ui.ui.basic.primary.label:hover {
background: var(--color-hover);
border-color: var(--color-primary-dark-1);
color: var(--color-primary-dark-1);
}
.ui.ui.ui.red.label {
background: var(--color-red);
border-color: var(--color-red);
color: var(--color-white);
}
a.ui.ui.ui.red.label:hover {
background: var(--color-red-dark-1);
border-color: var(--color-red-dark-1);
color: var(--color-white);
}
.ui.ui.ui.basic.red.label {
background: transparent;
border-color: var(--color-red);
color: var(--color-red);
}
a.ui.ui.ui.basic.red.label:hover {
background: transparent;
border-color: var(--color-red-dark-1);
color: var(--color-red-dark-1);
}
.ui.ui.ui.orange.label {
background: var(--color-orange);
border-color: var(--color-orange);
color: var(--color-white);
}
a.ui.ui.ui.orange.label:hover {
background: var(--color-orange-dark-1);
border-color: var(--color-orange-dark-1);
color: var(--color-white);
}
.ui.ui.ui.basic.orange.label {
background: transparent;
border-color: var(--color-orange);
color: var(--color-orange);
}
a.ui.ui.ui.basic.orange.label:hover {
background: transparent;
border-color: var(--color-orange-dark-1);
color: var(--color-orange-dark-1);
}
.ui.ui.ui.yellow.label {
background: var(--color-yellow);
border-color: var(--color-yellow);
color: var(--color-white);
}
a.ui.ui.ui.yellow.label:hover {
background: var(--color-yellow-dark-1);
border-color: var(--color-yellow-dark-1);
color: var(--color-white);
}
.ui.ui.ui.basic.yellow.label {
background: transparent;
border-color: var(--color-yellow);
color: var(--color-yellow);
}
a.ui.ui.ui.basic.yellow.label:hover {
background: transparent;
border-color: var(--color-yellow-dark-1);
color: var(--color-yellow-dark-1);
}
.ui.ui.ui.green.label {
background: var(--color-green);
border-color: var(--color-green);
color: var(--color-white);
}
a.ui.ui.ui.green.label:hover {
background: var(--color-green-dark-1);
border-color: var(--color-green-dark-1);
color: var(--color-white);
}
.ui.ui.ui.basic.green.label {
background: transparent;
border-color: var(--color-green);
color: var(--color-green);
}
a.ui.ui.ui.basic.green.label:hover {
background: transparent;
border-color: var(--color-green-dark-1);
color: var(--color-green-dark-1);
}
.ui.ui.ui.purple.label {
background: var(--color-purple);
border-color: var(--color-purple);
color: var(--color-white);
}
a.ui.ui.ui.purple.label:hover {
background: var(--color-purple-dark-1);
border-color: var(--color-purple-dark-1);
color: var(--color-white);
}
.ui.ui.ui.grey.label {
background: var(--color-label-bg);
border-color: var(--color-label-bg);
color: var(--color-label-text);
}
a.ui.ui.ui.grey.label:hover {
background: var(--color-label-hover-bg);
border-color: var(--color-label-hover-bg);
color: var(--color-white);
}
/* "horizontal label" is actually "fat label" which has enough padding spaces to be used standalone in headers */
.ui.horizontal.label {
margin: 0 0.5em 0 0;
padding: 0.4em 0.833em;
min-width: 3em;
text-align: center;
}
.ui.circular.label {
min-width: 2em;
min-height: 2em;
padding: 0.5em !important;
line-height: 1;
text-align: center;
border-radius: 500rem;
justify-content: center;
}
.ui.mini.label {
font-size: 0.64285714rem;
}
.ui.tiny.label {
font-size: 0.71428571rem;
}
.ui.small.label {
font-size: 0.78571429rem;
}
.ui.large.label {
font-size: 1rem;
}
/* labels-list layout: span.labels-list > a.item > span.ui.label,
by default, the labels list is rendered as "display: inline",
it can also be rendered as flex by adding flex-related classes (the general ".item" selector also applies) */
.labels-list {
max-width: 100%; /* for ellipsis */
font-size: var(--font-size-label); /* must match the label font size, otherwise the height mismatches */
}
.labels-list > .item {
max-width: 100%; /* for ellipsis */
}
.labels-list a:hover {
text-decoration: none;
}
.labels-list .ui.label {
min-height: 20px;
padding-top: 0;
padding-bottom: 0;
}
/* to align with different font sizes, these styles need to be written separately */
#issue-list .labels-list > .item {
margin-right: 4px; /* margin-right (not margin-left) keeps wrapped labels left-aligned */
vertical-align: 2.5px; /* compensates inline-flex baseline so labels center with text */
}
.timeline-item .labels-list > .item {
margin-right: 4px;
vertical-align: 1.5px;
}
/* Scoped labels with different colors on left and right */
.ui.label.scope-parent {
background: none !important;
padding: 0 !important;
gap: 0 !important;
}
.ui.label.scope-parent > .ui.label {
margin: 0 !important; /* scoped label's margin is handled by the parent */
}
.ui.label.scope-left {
border-bottom-right-radius: 0;
border-top-right-radius: 0;
}
.ui.label.scope-middle {
border-radius: 0;
}
.ui.label.scope-right {
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}
.ui.label.archived-label {
filter: grayscale(0.5);
opacity: 0.5;
}