-
Notifications
You must be signed in to change notification settings - Fork 250
Expand file tree
/
Copy pathanimations.css
More file actions
70 lines (61 loc) · 1.73 KB
/
Copy pathanimations.css
File metadata and controls
70 lines (61 loc) · 1.73 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
@layer animations {
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
/* Pop-in animation for modals/overlays - swings from above */
.animate-pop-in {
opacity: 1;
transform: perspective(1000px) rotateX(0deg) translateZ(0);
transition:
opacity 150ms cubic-bezier(0.4, 0, 0.2, 1),
transform 150ms cubic-bezier(0.4, 0, 0.2, 1),
overlay 150ms cubic-bezier(0.4, 0, 0.2, 1) allow-discrete,
display 150ms cubic-bezier(0.4, 0, 0.2, 1) allow-discrete;
/* Entry - where to animate FROM */
@starting-style {
opacity: 0;
transform: perspective(1000px) rotateX(-15deg) translateZ(-80px);
}
/* Exit - where to animate TO when closing */
&[data-state="closing"] {
opacity: 0;
transform: perspective(1000px) rotateX(-15deg) translateZ(-80px);
}
&[data-state="closing"]::backdrop {
opacity: 0;
}
}
/* Backdrop animation for dialogs */
dialog::backdrop {
opacity: 1;
transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);
@starting-style {
opacity: 0;
}
}
/* Slide-in animation for toasts */
.animate-slide-in {
opacity: 1;
transform: translateX(0);
transition:
opacity 150ms cubic-bezier(0.16, 1, 0.3, 1),
transform 150ms cubic-bezier(0.16, 1, 0.3, 1);
/* Entry - slide in from right */
@starting-style {
opacity: 0;
transform: translateX(100%);
}
/* Exit - slide out to right */
&[data-state="closing"] {
opacity: 0;
transform: translateX(100%);
}
}
}