-
Notifications
You must be signed in to change notification settings - Fork 4
/
bootleg-modal.css
70 lines (62 loc) · 1.78 KB
/
bootleg-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
69
70
/*
* Bootleg.css
* https://github.com/ryanseddon/bootleg
*
* WTFPL - http://sam.zoy.org/wtfpl/
*/
#modals input + .modalclose {
-webkit-transition: opacity 0.3s linear;
-moz-transition: opacity 0.3s linear;
-ms-transition: opacity 0.3s linear;
-o-transition: opacity 0.3s linear;
transition: opacity 0.3s linear;
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: -1;
opacity: 0;
}
#modals input + .modal {
left: 50%;
margin: 0;
top: 0;
opacity: 0;
-webkit-transition: -webkit-transform 0.3s ease-in, opacity 0.3s linear;
-moz-transition: -moz-transform 0.3s ease-in, opacity 0.3s linear;
-ms-transition: -ms-transform 0.3s ease-in, opacity 0.3s linear;
-o-transition: -o-transform 0.3s ease-in, opacity 0.3s linear;
transition: transform 0.3s ease-in, opacity 0.3s linear;
-webkit-transform: translate(-50%,-100%);
-moz-transform: translate(-50%,-100%);
-ms-transform: translate(-50%,-100%);
-o-transform: translate(-50%,-100%);
transform: translate(-50%,-100%);
}
#modals input:checked + .modal {
top: 0;
opacity: 1;
-webkit-transition-delay: 0.4s;
-moz-transition-delay: 0.4s;
-ms-transition-delay: 0.4s;
-o-transition-delay: 0.4s;
transition-delay: 0.4s;
-webkit-transform: translate(-50%,20%);
-moz-transform: translate(-50%,20%);
-ms-transform: translate(-50%,20%);
-o-transform: translate(-50%,20%);
transform: translate(-50%,20%);
}
/* Close modal */
#modals input:not(#closemodal):checked ~ .modalclose {
opacity: 0.8;
z-index: 1;
background: #000;
margin: 0 !important;
-webkit-transition-delay: 0;
-moz-transition-delay: 0;
-ms-transition-delay: 0;
-o-transition-delay: 0;
transition-delay: 0;
}