forked from Nova-reward/Nova-Rewards
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanimation-tokens.css
More file actions
129 lines (110 loc) · 3.7 KB
/
Copy pathanimation-tokens.css
File metadata and controls
129 lines (110 loc) · 3.7 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
128
129
:root {
/* Buttons */
--animation-button-press-duration: 80ms;
--animation-button-press-timing-function: ease-out;
--animation-button-hover-duration: 150ms;
--animation-button-hover-timing-function: ease;
--animation-button-focus-duration: 100ms;
--animation-button-focus-timing-function: ease-out;
/* Loading */
--animation-loading-skeleton-duration: 1.5s;
--animation-loading-skeleton-timing-function: linear;
--animation-loading-spinner-duration: 400ms;
--animation-loading-spinner-timing-function: linear;
--animation-progress-fill-duration: 240ms;
--animation-progress-fill-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
/* Confetti */
--animation-confetti-duration: 1.2s;
--animation-confetti-timing-function: ease-out;
--animation-confetti-particles: 200;
/* Counter */
--animation-counter-increment-duration: 700ms;
--animation-counter-increment-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
/* Button interaction pseudo-class animations */
.btn {
transition: transform var(--animation-button-press-duration) var(--animation-button-press-timing-function),
background-color var(--animation-button-hover-duration) var(--animation-button-hover-timing-function),
box-shadow var(--animation-button-focus-duration) var(--animation-button-focus-timing-function);
}
.btn:active {
transform: scale(0.97);
}
.btn:hover {
background-color: var(--btn-hover-bg, #005fcc);
}
.btn:focus-visible {
outline: 0;
box-shadow: 0 0 0 3px rgba(95, 156, 255, 0.45);
animation: focus-ring-fade-in var(--animation-button-focus-duration) forwards;
}
@keyframes focus-ring-fade-in {
from { box-shadow: 0 0 0 0 rgba(95, 156, 255, 0); }
to { box-shadow: 0 0 0 3px rgba(95, 156, 255, 0.45); }
}
/* Loading states */
.skeleton {
position: relative;
overflow: hidden;
background: #e5e7eb;
}
.skeleton::after {
content: "";
position: absolute;
top: 0;
left: -150%;
width: 250%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
animation: skeleton-shimmer var(--animation-loading-skeleton-duration) var(--animation-loading-skeleton-timing-function) infinite;
}
@keyframes skeleton-shimmer {
0% { transform: translateX(0); }
100% { transform: translateX(100%); }
}
.spinner {
display: inline-block;
width: 1.25rem;
height: 1.25rem;
border: 3px solid rgba(0, 0, 0, 0.15);
border-top-color: rgba(0, 0, 0, 0.65);
border-radius: 50%;
animation: spinner-rotate var(--animation-loading-spinner-duration) var(--animation-loading-spinner-timing-function) infinite;
}
@keyframes spinner-rotate {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.progress-bar {
height: 4px;
background: #dbeafe;
overflow: hidden;
}
.progress-bar__fill {
width: 0%;
height: 100%;
background: linear-gradient(90deg, #3b82f6, #06b6d4);
transition: width var(--animation-progress-fill-duration) var(--animation-progress-fill-timing-function);
}
/* Confetti particles (for CSS-based fallback) */
.confetti-particle {
position: absolute;
width: 6px;
height: 6px;
opacity: 0;
animation: confetti-burst var(--animation-confetti-duration) var(--animation-confetti-timing-function) forwards;
}
@keyframes confetti-burst {
0% { transform: translate3d(0, 0, 0) scale(1); opacity: 1; }
90% { opacity: 1; }
100% { transform: translate3d(var(--tx), var(--ty), 0) scale(0.5); opacity: 0; }
}
/* Points-counter increment style */
.points-counter--increment{
animation: points-counter-pop var(--animation-counter-increment-duration) var(--animation-counter-increment-timing-function);
}
@keyframes points-counter-pop {
0% { transform: scale(1); }
30% { transform: scale(1.2); }
100% { transform: scale(1); }
}