-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmodal.css
More file actions
129 lines (127 loc) · 2.36 KB
/
modal.css
File metadata and controls
129 lines (127 loc) · 2.36 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
div[class*="-modal"]{
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100%;
display: none;
z-index: 50;
margin:0;
padding:0;
}
div[class*="-modal"] .modal-background {
/* opacity: 0; */
transition: 2s;
background-color: black;
width: 100vw;
height: 100%;
position:relative;
animation: closing 1s;
margin:0;
padding:0;
}
div[class*="-modal"].active {
display:block;
/* display: flex;
justify-content: center;
align-items: center; */
}
div[class*="-modal"].active .modal-background {
opacity: 0.5;
animation: showingBackground 1s;
/* animation-iteration-count: 1; */
}
div[class*="-modal"].active .modal-body {
opacity: 0.5;
animation: showingBody 1s;
/* animation-iteration-count: 1; */
}
/* div[class*="-modal"].active::-webkit-scrollbar-track{
} */
div[class*="-modal"].closing {
opacity: 0;
animation: showing 1s;
animation-direction: reverse;
/* animation-iteration-count: 1; */
}
/* div[class*="-modal"].closing .modal-body {
opacity: 0.5;
animation: showingBody 1s;
animation-direction: reverse;
animation-iteration-count: 1;
} */
@keyframes showing{
0%{
opacity:0;
}
100%{
opacity:1;
}
}
@keyframes showingBackground{
0%{
opacity:0;
}
100%{
opacity:0.5;
}
}
/* @keyframes closingBackground{
0%{
opacity:0.5;
}
100%{
opacity:0;
}
} */
@keyframes showingBody{
0%{
transform: translate(-50%, -100em);
}
75%{
transform: translate(-50%, 5em);
}
100%{
transform: translate(-48%, -50%);
}
}
/* @keyframes closingBody{
0%{
opacity:0.5;
}
100%{
opacity:0;
}
} */
.modal-body {
position:absolute;
top:50%;
left:50%;
transform:translate(-50%, -50%);
background: var(--color-content);
opacity: 1 !important;
border-radius: 1em;
z-index: 51;
}
.modal-body .content{
display: flex;
flex-direction: column;
width: 100%;
pointer-events: auto;
background-clip: padding-box;
outline: 0;
}
.modal-body .content > *{
margin-bottom: 1em;
}
.modal-body .content > *:last-child{
margin: 0!important;
}
.modal-body button{
transition: 0.5s;
}
.modal-body button:hover{
transform: scaleY(1.1) scaleX(1.05);
background-color:#888;
color:white;
}