forked from mainmatter/ember-promise-modals
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ember-promise-modals.css
132 lines (119 loc) · 3.44 KB
/
ember-promise-modals.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
:root {
/* The named -duration and -delay variables will be lowered to near zero when using the setupPromiseModals test helper */
--epm-animation-backdrop-in-duration: 0.3s;
--epm-animation-backdrop-out-duration: 0.18s;
--epm-animation-modal-in-duration: 0.3s;
--epm-animation-modal-out-duration: 0.18s;
--epm-animation-backdrop-in-delay: 0s;
--epm-animation-backdrop-out-delay: 0s;
--epm-animation-modal-in-delay: 0s;
--epm-animation-modal-out-delay: 0s;
--epm-animation-backdrop-in: var(--epm-animation-backdrop-in-duration) ease var(--epm-animation-backdrop-in-delay) forwards epm-backdrop-in;
--epm-animation-backdrop-out: var(--epm-animation-backdrop-out-duration) ease var(--epm-animation-backdrop-out-delay) forwards epm-backdrop-out;
--epm-animation-modal-in: var(--epm-animation-modal-in-duration) ease-out var(--epm-animation-modal-in-delay) forwards epm-modal-in;
--epm-animation-modal-out: var(--epm-animation-modal-out-duration) ease-out var(--epm-animation-modal-out-delay) forwards epm-modal-out;
--epm-backdrop-background: #2d3748CD;
}
@media (prefers-reduced-motion: reduce) {
:root {
--epm-animation-backdrop-in-duration: 0.001s;
--epm-animation-backdrop-out-duration: 0.001s;
--epm-animation-modal-in-duration: 0.001s;
--epm-animation-modal-out-duration: 0.001s;
--epm-animation-backdrop-in-delay: 0.001s;
--epm-animation-backdrop-out-delay: 0.001s;
--epm-animation-modal-in-delay: 0.001s;
--epm-animation-modal-out-delay: 0.001s;
}
}
.epm-scrolling-disabled {
overflow: hidden;
}
.epm-backdrop,
.epm-modal-container {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.epm-backdrop {
background-color: var(--epm-backdrop-background);
opacity: 0;
animation: var(--epm-animation-backdrop-in);
animation-delay: var(--epm-animation-backdrop-in-delay);
animation-duration: var(--epm-animation-backdrop-in-duration);
}
.epm-modal-container {
display: flex;
align-items: center;
justify-content: center;
overflow: auto;
}
.epm-animating .epm-modal-container {
overflow: unset;
}
.epm-modal {
margin: auto;
transform: translate(0, -30vh) scale(1.1);
opacity: 0;
animation: var(--epm-animation-modal-in);
animation-delay: var(--epm-animation-modal-in-delay);
animation-duration: var(--epm-animation-modal-in-duration);
-webkit-overflow-scrolling: touch; /* momentum-based scrolling for Safari on iOS */
}
.epm-backdrop.epm-out {
opacity: 1;
animation: var(--epm-animation-backdrop-out);
animation-delay: var(--epm-animation-backdrop-out-delay);
animation-duration: var(--epm-animation-backdrop-out-duration);
pointer-events: none;
}
.epm-modal.epm-out {
transform: translate(0, 0) scale(1);
opacity: 1;
animation: var(--epm-animation-modal-out);
animation-delay: var(--epm-animation-modal-out-delay);
animation-duration: var(--epm-animation-modal-out-duration);
pointer-events: none;
}
@keyframes epm-backdrop-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes epm-backdrop-out {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@keyframes epm-modal-in {
0% {
transform: translate(0, -30vh) scale(1.1);
opacity: 0;
}
72% {
transform: translate(0, 0) scale(0.99);
opacity: 1;
}
100% {
transform: translate(0, 0) scale(1);
opacity: 1;
}
}
@keyframes epm-modal-out {
0% {
transform: translate(0, 0) scale(1);
opacity: 1;
}
100% {
transform: translate(0, -10vh) scale(0.8);
opacity: 0;
}
}