-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsimple-modal.css
68 lines (66 loc) · 1.17 KB
/
simple-modal.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
.modal, .modal * {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.overflow-hidden {
overflow: hidden;
}
.overflow-hidden body {
overflow: hidden;
}
.modal {
position: fixed;
left: 0;
right: 0;
width: 100%;
height: 100%;
top: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 20;
opacity: 0;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-webkit-transition: opacity 0.3s ease-in-out;
transition: opacity 0.3s ease-in-out;
}
.modal[aria-hidden=true] {
display: none;
}
.modal[aria-hidden=false] {
display: block;
}
.modal.is-open {
opacity: 1;
}
.modal__wrapper {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
padding: 20px 20px;
max-height: 92vh;
height: 100%;
width: 100%;
}
.modal__inner {
position: relative;
max-width: 800px;
margin: auto;
background-color: #fff;
padding: 40px 30px;
border-radius: 12px;
max-height: 100%;
overflow: auto;
}
.modal__close {
position: absolute;
cursor: pointer;
right: 5px;
top: 5px;
font-size: 40px;
border: none;
background: 0;
outline: transparent;
-webkit-box-shadow: none;
box-shadow: none;
}