mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-14 00:31:34 +08:00
6c86034e0f
Backport #30707 by @silverwind Fixes https://github.com/go-gitea/gitea/issues/30673, all 23 issues. Notes: - Tab bar menus had to change to pills because of unsolvable issue with the border-radius as tab bar renders a overlapping border onto the box below. And I think pills look better. - Added padding to code editor empty preview message - Hide monaco's built-in blue focus border, we don't need it and it never showed before either. - Label add menu is simplified, removing the nested segment. <img width="1322" alt="Screenshot 2024-04-25 at 22 26 19" src="https://github.com/go-gitea/gitea/assets/115237/7e394e0c-b7ad-417d-8e9f-12f1dea93ed1"> <img width="1326" alt="Screenshot 2024-04-25 at 22 28 00" src="https://github.com/go-gitea/gitea/assets/115237/66c8499f-aa9f-4d95-8cca-ef13dfa82c65"> <img width="997" alt="Screenshot 2024-04-25 at 22 36 53" src="https://github.com/go-gitea/gitea/assets/115237/07896102-c71d-4246-8173-c2bc2e1d3cae"> <img width="832" alt="Screenshot 2024-04-25 at 22 56 09" src="https://github.com/go-gitea/gitea/assets/115237/d83afc96-08ca-4adc-baf4-3d02804be57c"> <img width="361" alt="Screenshot 2024-04-25 at 22 57 12" src="https://github.com/go-gitea/gitea/assets/115237/c7371a68-00b5-47d8-84d0-ddc5268b2b2c"> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
208 lines
4.4 KiB
CSS
208 lines
4.4 KiB
CSS
/* based on Fomantic UI segment module, with just the parts extracted that we use. If you find any
|
|
unused rules here after refactoring, please remove them. */
|
|
|
|
.ui.segment {
|
|
position: relative;
|
|
margin: 1rem 0;
|
|
padding: 1em;
|
|
border-radius: 0.28571429rem;
|
|
border: 1px solid var(--color-secondary);
|
|
background: var(--color-box-body);
|
|
color: var(--color-text);
|
|
}
|
|
.ui.segment:first-child {
|
|
margin-top: 0;
|
|
}
|
|
.ui.segment:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.ui.grid.segment {
|
|
margin: 1rem 0;
|
|
border-radius: 0.28571429rem;
|
|
}
|
|
|
|
.ui.segment.tab:last-child {
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.ui.segments {
|
|
flex-direction: column;
|
|
position: relative;
|
|
margin: 1rem 0;
|
|
border: 1px solid var(--color-secondary);
|
|
border-radius: 0.28571429rem;
|
|
background: var(--color-box-body);
|
|
color: var(--color-text);
|
|
}
|
|
.ui.segments:first-child {
|
|
margin-top: 0;
|
|
}
|
|
.ui.segments:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.ui.segments > .segment {
|
|
top: 0;
|
|
bottom: 0;
|
|
border-radius: 0;
|
|
margin: 0;
|
|
width: auto;
|
|
box-shadow: none;
|
|
border: none;
|
|
border-top: 1px solid var(--color-secondary);
|
|
}
|
|
.ui.segments:not(.horizontal) > .segment:first-child {
|
|
top: 0;
|
|
bottom: 0;
|
|
border-top: none;
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
border-radius: 0.28571429rem 0.28571429rem 0 0;
|
|
}
|
|
|
|
.ui.segments:not(.horizontal) > .segment:last-child {
|
|
top: 0;
|
|
bottom: 0;
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
border-radius: 0 0 0.28571429rem 0.28571429rem;
|
|
}
|
|
|
|
.ui.segments:not(.horizontal) > .segment:only-child,
|
|
.ui.segments:not(.horizontal) > .segment:has(~ .tw-hidden) { /* workaround issue with :last-child ignoring hidden elements */
|
|
border-radius: 0.28571429rem;
|
|
}
|
|
|
|
.ui.segments > .ui.segments {
|
|
border-top: 1px solid var(--color-secondary);
|
|
margin: 1rem;
|
|
}
|
|
.ui.segments > .segments:first-child {
|
|
border-top: none;
|
|
}
|
|
.ui.segments > .segment + .segments:not(.horizontal) {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.ui.horizontal.segments {
|
|
display: flex;
|
|
flex-direction: row;
|
|
background-color: transparent;
|
|
padding: 0;
|
|
margin: 1rem 0;
|
|
border-radius: 0.28571429rem;
|
|
border: 1px solid var(--color-secondary);
|
|
}
|
|
|
|
.ui.horizontal.segments > .segment {
|
|
margin: 0;
|
|
min-width: 0;
|
|
border-radius: 0;
|
|
border: none;
|
|
box-shadow: none;
|
|
border-left: 1px solid var(--color-secondary);
|
|
}
|
|
|
|
.ui.segments > .horizontal.segments:first-child {
|
|
border-top: none;
|
|
}
|
|
.ui.horizontal.segments:not(.stackable) > .segment:first-child {
|
|
border-left: none;
|
|
}
|
|
.ui.horizontal.segments > .segment:first-child {
|
|
border-radius: 0.28571429rem 0 0 0.28571429rem;
|
|
}
|
|
.ui.horizontal.segments > .segment:last-child {
|
|
border-radius: 0 0.28571429rem 0.28571429rem 0;
|
|
}
|
|
|
|
.ui.clearing.segment::after {
|
|
content: "";
|
|
display: block;
|
|
clear: both;
|
|
}
|
|
|
|
.ui[class*="left aligned"].segment {
|
|
text-align: left;
|
|
}
|
|
.ui[class*="center aligned"].segment {
|
|
text-align: center;
|
|
}
|
|
|
|
.ui.secondary.segment {
|
|
background: var(--color-secondary-bg);
|
|
color: var(--color-text-light);
|
|
}
|
|
|
|
.ui.attached.segment {
|
|
top: 0;
|
|
bottom: 0;
|
|
border-radius: 0;
|
|
margin: 0 -1px;
|
|
width: calc(100% + 2px);
|
|
max-width: calc(100% + 2px);
|
|
box-shadow: none;
|
|
border: 1px solid var(--color-secondary);
|
|
background: var(--color-box-body);
|
|
color: var(--color-text);
|
|
}
|
|
.ui.attached:not(.message) + .ui.attached.segment:not(.top) {
|
|
border-top: none;
|
|
}
|
|
|
|
.ui.attached.segment:has(+ .ui[class*="top attached"].header),
|
|
.ui.attached.segment:last-child,
|
|
.ui.segment:has(+ .ui.segment:not(.attached)),
|
|
.ui.attached.segment:has(+ .ui.modal) {
|
|
border-radius: 0 0 0.28571429rem 0.28571429rem;
|
|
}
|
|
|
|
.ui[class*="top attached"].segment {
|
|
bottom: 0;
|
|
margin-bottom: 0;
|
|
top: 0;
|
|
margin-top: 1rem;
|
|
border-radius: 0.28571429rem 0.28571429rem 0 0;
|
|
}
|
|
.ui.segment[class*="top attached"]:first-child {
|
|
margin-top: 0;
|
|
}
|
|
.ui[class*="top attached"].segment:last-child {
|
|
border-top-left-radius: 0.28571429rem;
|
|
border-top-right-radius: 0.28571429rem;
|
|
}
|
|
|
|
.ui.segment[class*="bottom attached"] {
|
|
bottom: 0;
|
|
margin-top: 0;
|
|
top: 0;
|
|
margin-bottom: 1rem;
|
|
border-radius: 0 0 0.28571429rem 0.28571429rem;
|
|
}
|
|
.ui.segment[class*="bottom attached"]:last-child {
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.ui.fitted.segment:not(.horizontally) {
|
|
padding-top: 0;
|
|
padding-bottom: 0;
|
|
}
|
|
.ui.fitted.segment:not(.vertically) {
|
|
padding-left: 0;
|
|
padding-right: 0;
|
|
}
|
|
|
|
.ui.segments .segment,
|
|
.ui.segment {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.ui.error.segment {
|
|
border-color: var(--color-error-border) !important;
|
|
}
|
|
|
|
.ui.warning.segment {
|
|
border-color: var(--color-warning-border) !important;
|
|
}
|