forked from koshikraj/ottopus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloaders.css
More file actions
127 lines (119 loc) · 3.2 KB
/
Copy pathloaders.css
File metadata and controls
127 lines (119 loc) · 3.2 KB
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
117
118
119
120
121
122
123
124
125
126
127
/* Ottopus — the loader family, L1 to L6.
Keyframes transcribed from the design system's Loader family section. They
keep the design's names so a future sync compares like with like — water.css
previously called the shimmer "ot-tide", which is the name the design gives
to the sweeping bar instead. That is now corrected there.
One rule decides which loader a screen uses: how much of the screen the wait
blocks. Inline waits get geometry only. Panel and page waits get Otto,
because there the wait is the screen. Never two Otto loaders at once. */
/* L1 · Tentacle ring. Eight dots, one per arm. Never six, never twelve. */
.ot-ring {
animation: ot-ring 2.4s linear infinite;
animation-play-state: var(--ot-ambient-play);
}
.ot-ring-dot {
animation: ot-ring-dot 1.6s ease-in-out infinite;
animation-play-state: var(--ot-ambient-play);
}
@keyframes ot-ring {
to {
transform: rotate(360deg);
}
}
@keyframes ot-ring-dot {
0%,
100% {
opacity: 0.18;
transform: scale(0.72);
}
45% {
opacity: 1;
transform: scale(1);
}
}
/* L2 · Tide bar. The sweep, not the shimmer — see the note above. */
.ot-tide {
animation: ot-tide 1.4s ease-in-out infinite;
animation-play-state: var(--ot-ambient-play);
}
@keyframes ot-tide {
0% {
transform: translateX(-100%);
}
100% {
transform: translateX(320%);
}
}
/* L4 · Full page. Otto rides higher and turns as he goes — a longer, looser
loop than the drift, because he is the only thing on the screen. */
.ot-float {
animation: ot-float 6s ease-in-out infinite;
animation-play-state: var(--ot-ambient-play);
}
@keyframes ot-float {
0%,
100% {
transform: translateY(0) rotate(-1deg);
}
50% {
transform: translateY(-8px) rotate(1.2deg);
}
}
/* L6 · Ink hold. The one dark loader. */
.ot-ink-pulse {
animation: ot-ink-pulse 2.2s ease-in-out infinite;
animation-play-state: var(--ot-ambient-play);
}
.ot-ink-ripple {
animation: ot-ink-ripple 2.8s ease-out infinite;
animation-play-state: var(--ot-ambient-play);
}
@keyframes ot-ink-pulse {
0%,
100% {
transform: scale(0.9);
opacity: 0.5;
}
50% {
transform: scale(1.06);
opacity: 0.9;
}
}
@keyframes ot-ink-ripple {
0% {
transform: scale(0.6);
opacity: 0.5;
}
100% {
transform: scale(1.9);
opacity: 0;
}
}
/* "Every loader keeps its layout and copy; only movement stops. Rings hold at
.55 opacity, shimmer becomes flat, bubbles are removed, Otto sits in his base
pose. Determinate bars still update — that's information, not decoration."
The determinate bar is deliberately absent from this block: its width is the
answer to "how far along is this", and freezing it would withhold that. */
@media (prefers-reduced-motion: reduce) {
.ot-ring,
.ot-ring-dot,
.ot-tide,
.ot-float,
.ot-ink-pulse,
.ot-ink-ripple {
animation: none !important;
transform: none !important;
}
.ot-ring-dot {
opacity: 0.55;
}
.ot-ink-ripple {
opacity: 0;
}
/* An indeterminate sweep with nowhere to go should read as a filled track
rather than a stalled sliver sitting at the left edge. */
.ot-tide {
width: 100% !important;
background: var(--ot-water-3) !important;
}
}