summaryrefslogtreecommitdiffstats
path: root/web_src/css/modules/animations.css
blob: a86c9234aa335e96a951ed88a88da857a9232386 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
@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-full);
}

.is-loading.loading-icon-2px::after {
  border-width: 2px;
}

.is-loading.loading-icon-3px::after {
  border-width: 3px;
}

/* 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 loading-icon-2px" 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;
}