-
Notifications
You must be signed in to change notification settings - Fork 5
/
animations.css
164 lines (139 loc) · 4.44 KB
/
animations.css
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
/****************************************************************
* Animation
* Variables for animating elements with CSS animations.
* animation: var(--animate-fade-in) forwards;
*****************************************************************/
:root {
--animate-fade-in: fade-in .5s cubic-bezier(.25, 0, .3, 1);
--animate-fade-in-bloom: fade-in-bloom 2s cubic-bezier(.25, 0, .3, 1);
--animate-fade-out: fade-out .5s cubic-bezier(.25, 0, .3, 1);
--animate-fade-out-bloom: fade-out-bloom 2s cubic-bezier(.25, 0, .3, 1);
--animate-scale-up: scale-up .5s cubic-bezier(.25, 0, .3, 1);
--animate-scale-down: scale-down .5s cubic-bezier(.25, 0, .3, 1);
--animate-slide-out-up: slide-out-up .5s cubic-bezier(.25, 0, .3, 1);
--animate-slide-out-down: slide-out-down .5s cubic-bezier(.25, 0, .3, 1);
--animate-slide-out-right: slide-out-right .5s cubic-bezier(.25, 0, .3, 1);
--animate-slide-out-left: slide-out-left .5s cubic-bezier(.25, 0, .3, 1);
--animate-slide-in-up: slide-in-up .5s cubic-bezier(.25, 0, .3, 1);
--animate-slide-in-down: slide-in-down .5s cubic-bezier(.25, 0, .3, 1);
--animate-slide-in-right: slide-in-right .5s cubic-bezier(.25, 0, .3, 1);
--animate-slide-in-left: slide-in-left .5s cubic-bezier(.25, 0, .3, 1);
--animate-shake-x: shake-x .75s cubic-bezier(0, 0, 0, 1);
--animate-shake-y: shake-y .75s cubic-bezier(0, 0, 0, 1);
--animate-shake-z: shake-z 1s cubic-bezier(0, 0, 0, 1);
--animate-spin: spin 2s linear infinite;
--animate-ping: ping 5s cubic-bezier(0, 0, .3, 1) infinite;
--animate-blink: blink 1s cubic-bezier(0, 0, .3, 1) infinite;
--animate-float: float 3s cubic-bezier(0, 0, 0, 1) infinite;
--animate-bounce: bounce 2s cubic-bezier(.5, -.3, .1, 1.5) infinite;
--animate-pulse: pulse 2s cubic-bezier(0, 0, .3, 1) infinite;
}
@keyframes fade-in {
to { opacity: 1 }
}
@keyframes fade-in-bloom {
0% { opacity: 0; filter: brightness(1) blur(20px) }
10% { opacity: 1; filter: brightness(2) blur(10px) }
100% { opacity: 1; filter: brightness(1) blur(0) }
}
@keyframes fade-out {
to { opacity: 0 }
}
@keyframes fade-out-bloom {
100% { opacity: 0; filter: brightness(1) blur(20px) }
10% { opacity: 1; filter: brightness(2) blur(10px) }
0% { opacity: 1; filter: brightness(1) blur(0) }
}
@keyframes scale-up {
to { transform: scale(1.25) }
}
@keyframes scale-down {
to { transform: scale(.75) }
}
@keyframes slide-out-up {
to { transform: translateY(-100%) }
}
@keyframes slide-out-down {
to { transform: translateY(100%) }
}
@keyframes slide-out-right {
to { transform: translateX(100%) }
}
@keyframes slide-out-left {
to { transform: translateX(-100%) }
}
@keyframes slide-in-up {
from { transform: translateY(100%) }
}
@keyframes slide-in-down {
from { transform: translateY(-100%) }
}
@keyframes slide-in-right {
from { transform: translateX(-100%) }
}
@keyframes slide-in-left {
from { transform: translateX(100%) }
}
@keyframes shake-x {
0%, 100% { transform: translateX(0%) }
20% { transform: translateX(-5%) }
40% { transform: translateX(5%) }
60% { transform: translateX(-5%) }
80% { transform: translateX(5%) }
}
@keyframes shake-y {
0%, 100% { transform: translateY(0%) }
20% { transform: translateY(-5%) }
40% { transform: translateY(5%) }
60% { transform: translateY(-5%) }
80% { transform: translateY(5%) }
}
@keyframes shake-z {
0%, 100% { transform: rotate(0deg) }
20% { transform: rotate(-2deg) }
40% { transform: rotate(2deg) }
60% { transform: rotate(-2deg) }
80% { transform: rotate(2deg) }
}
@keyframes spin {
to { transform: rotate(1turn) }
}
@keyframes ping {
90%, 100% {
transform: scale(2);
opacity: 0;
}
}
@keyframes blink {
0%, 100% {
opacity: 1
}
50% {
opacity: .5
}
}
@keyframes float {
50% { transform: translateY(-25%) }
}
@keyframes bounce {
25% { transform: translateY(-20%) }
40% { transform: translateY(-3%) }
0%, 60%, 100% { transform: translateY(0) }
}
@keyframes pulse {
50% { transform: scale(.9,.9) }
}
@media (prefers-color-scheme: dark) {
@keyframes fade-in-bloom {
0% { opacity: 0; filter: brightness(1) blur(20px) }
10% { opacity: 1; filter: brightness(0.5) blur(10px) }
100% { opacity: 1; filter: brightness(1) blur(0) }
}
}
@media (prefers-color-scheme: dark) {
@keyframes fade-out-bloom {
100% { opacity: 0; filter: brightness(1) blur(20px) }
10% { opacity: 1; filter: brightness(0.5) blur(10px) }
0% { opacity: 1; filter: brightness(1) blur(0) }
}
}