mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-03 22:14:16 +00:00
Clean up templates, remove various CSS patches. By the way, fix incorrect NewRequest URLs in tests.
134 lines
3.1 KiB
CSS
134 lines
3.1 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 (use parent padding) */
|
|
.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 > .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;
|
|
/* labels are under effect of this gap here because they are display:contents. Ideally we should make wrapping
|
|
of labels work without display: contents and set this to a static value again. */
|
|
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 */
|
|
.container-divided > .flex-divided-list > .item {
|
|
padding-left: 1em;
|
|
padding-right: 1em;
|
|
}
|
|
.container-divided > .flex-divided-list > .item.flex-divided-list {
|
|
padding: 0;
|
|
}
|
|
|
|
.container-padded > .flex-divided-list > .item:first-child,
|
|
.ui.segment:not(.container-divided) > .flex-divided-list > .item:first-child {
|
|
padding-top: 0;
|
|
}
|
|
|
|
.container-padded > .flex-divided-list > .item:last-child,
|
|
.ui.segment:not(.container-divided) > .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;
|
|
}
|
|
|
|
.container-padded > .flex-divided-list + .divider {
|
|
margin-top: 10px;
|
|
}
|