forge
Explore
Log in

Don't you dare go Hollow

forge

Clone
★ 0

0 watching0 forksRustAGPL-3.07.1 MiB490f099Tahinli7 hours ago322 commits

_feedback.scss74 lines, 1.4 KiBHistoryRawDownload
1// Submit feedback. A button whose POST is slow gets is-busy (nav.js adds it after 150 ms, and only
2// while the request is in flight). It dims and shows a small spinner; it is never disabled. Once the
3// server confirmed the save, a done-tick sits after the button for a moment, then fades out.
4
5.is-busy {
6 cursor: progress;
7 opacity: 0.75;
8
9 &::after {
10 content: "";
11 display: inline-block;
12 width: 12px;
13 height: 12px;
14 margin-left: 8px;
15 vertical-align: -2px;
16 border: 2px solid currentColor;
17 border-right-color: transparent;
18 border-radius: 50%;
19 animation: busy-spin 0.7s linear infinite;
20 }
21}
22
23@keyframes busy-spin {
24 to {
25 transform: rotate(360deg);
26 }
27}
28
29.done-tick {
30 display: inline-flex;
31 align-items: center;
32 gap: 4px;
33 margin-left: 8px;
34 color: var(--ok);
35 font-size: 0.875em;
36 font-weight: 500;
37 white-space: nowrap;
38 animation: done-tick 2.2s ease-out both;
39
40 .ico {
41 width: 14px;
42 height: 14px;
43 fill: none;
44 stroke: currentColor;
45 stroke-width: 2.2;
46 stroke-linecap: round;
47 stroke-linejoin: round;
48 }
49}
50
51// Quick fade in, hold, then fade out over the last part of the 2.2 s.
52@keyframes done-tick {
53 0% {
54 opacity: 0;
55 }
56 12%,
57 78% {
58 opacity: 1;
59 }
60 100% {
61 opacity: 0;
62 }
63}
64
65@media (prefers-reduced-motion: reduce) {
66 // No spin: the dimmed label alone shows it is busy.
67 .is-busy::after {
68 display: none;
69 }
70
71 .done-tick {
72 animation: none;
73 }
74}