mirror of
https://github.com/go-gitea/gitea
synced 2024-11-06 10:14:25 +00:00
591759fdfa
Backport #30162 by @silverwind CSS is pretty slim already and the `.ui.toggle.checkbox` sliders on admin page also still work. The only necessary JS is the one that links `input` and `label` so that it can be toggled via label. All checkboxes except the markdown ones render at `--checkbox-size: 16px` now. <img width="174" alt="Screenshot 2024-03-28 at 22 15 10" src="https://github.com/go-gitea/gitea/assets/115237/3455c1bb-166b-47e4-9847-2d20dd1f04db"> <img width="499" alt="Screenshot 2024-03-28 at 21 00 07" src="https://github.com/go-gitea/gitea/assets/115237/412be2b3-d5a0-478a-b17b-43e6bc12e8ce"> <img width="83" alt="Screenshot 2024-03-28 at 22 14 34" src="https://github.com/go-gitea/gitea/assets/115237/d8c89838-a420-4723-8c49-89405bb39474"> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: delvh <dev.lh@web.de>
113 lines
2.1 KiB
CSS
113 lines
2.1 KiB
CSS
@keyframes isloadingspin {
|
|
0% { transform: translate(-50%, -50%) rotate(0deg); }
|
|
100% { transform: translate(-50%, -50%) rotate(360deg); }
|
|
}
|
|
|
|
.is-loading {
|
|
pointer-events: none !important;
|
|
position: relative !important;
|
|
}
|
|
|
|
.is-loading > * {
|
|
opacity: 0.3;
|
|
}
|
|
|
|
.btn.is-loading > *,
|
|
.button.is-loading > * {
|
|
opacity: 0;
|
|
}
|
|
|
|
.is-loading::after {
|
|
content: "";
|
|
position: absolute;
|
|
display: block;
|
|
left: 50%;
|
|
top: 50%;
|
|
height: min(4em, 66.6%);
|
|
width: fit-content; /* compat: safari - https://bugs.webkit.org/show_bug.cgi?id=267625 */
|
|
aspect-ratio: 1;
|
|
transform: translate(-50%, -50%);
|
|
animation: isloadingspin 1000ms infinite linear;
|
|
border-width: 4px;
|
|
border-style: solid;
|
|
border-color: var(--color-secondary) var(--color-secondary) var(--color-secondary-dark-8) var(--color-secondary-dark-8);
|
|
border-radius: var(--border-radius-circle);
|
|
}
|
|
|
|
.is-loading.small-loading-icon::after {
|
|
border-width: 2px;
|
|
}
|
|
|
|
/* for single form button, the loading state should be on the button, but not go semi-transparent, just replace the text on the button with the loader. */
|
|
form.single-button-form.is-loading > * {
|
|
opacity: 1;
|
|
}
|
|
|
|
form.single-button-form.is-loading .button {
|
|
color: transparent;
|
|
}
|
|
|
|
.markup pre.is-loading,
|
|
.editor-loading.is-loading,
|
|
.pdf-content.is-loading {
|
|
height: var(--height-loading);
|
|
}
|
|
|
|
.markup .is-loading > * {
|
|
visibility: hidden;
|
|
}
|
|
|
|
.markup .is-loading {
|
|
color: transparent;
|
|
background: transparent;
|
|
}
|
|
|
|
/* TODO: not needed, use "is-loading small-loading-icon" instead */
|
|
code.language-math.is-loading::after {
|
|
padding: 0;
|
|
border-width: 2px;
|
|
width: 1.25rem;
|
|
height: 1.25rem;
|
|
}
|
|
|
|
@keyframes fadein {
|
|
0% {
|
|
opacity: 0;
|
|
}
|
|
100% {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
@keyframes fadeout {
|
|
0% {
|
|
opacity: 1;
|
|
}
|
|
100% {
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0% {
|
|
transform: scale(1);
|
|
}
|
|
50% {
|
|
transform: scale(1.8);
|
|
}
|
|
100% {
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
|
|
.pulse {
|
|
animation: pulse 2s linear;
|
|
}
|
|
|
|
.ui.modal,
|
|
.ui.dimmer.transition {
|
|
animation-name: fadein;
|
|
animation-duration: 100ms;
|
|
animation-timing-function: ease-in-out;
|
|
}
|