forked from drublic/css-modal
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_modal-theme.scss
More file actions
137 lines (106 loc) · 2.52 KB
/
_modal-theme.scss
File metadata and controls
137 lines (106 loc) · 2.52 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
130
131
132
133
134
135
136
137
/**
* CSS Modal Themes
* http://drublic.github.com/css-modal
*
* @author Hans Christian Reinl - @drublic
*/
/*
* Global Theme Styles
*/
%modal-theme {
color: $modal-color;
line-height: 1.3;
// Content Area
.modal-inner {
border-radius: $modal-border-radius;
background: $modal-inner-background;
-webkit-box-shadow: 0 0 30px rgba(0,0,0,0.6);
box-shadow: 0 0 30px rgba(0,0,0,0.6);
max-width: 100%;
-webkit-transition: max-width 0.25s linear,
margin-left 0.125s linear;
transition: max-width 0.25s linear,
margin-left 0.125s linear;
}
// Header
header {
border-bottom: 1px solid $modal-border-color;
padding: 0 1.2em;
> h2 {
margin: 0.5em 0;
}
}
// Content
.modal-content {
border-bottom: 1px solid $modal-border-color;
padding: 15px 1.2em;
}
// Footer
footer {
border-top: 1px solid lighten($modal-border-color, 20);
padding: 0 1.2em 18px;
background: #f0f0f0;
border-radius: $modal-border-radius;
}
// A close button
.modal-close {
text-indent: -100px;
// Background as close
&:before {
// Background for overlay: Data URI because of IE8 not supporting rgba
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAEUlEQVQoz2NgeEYAjioYSQoAzOTmAXhPhyoAAAAASUVORK5CYII=');
}
// Actual close button on modal
&:after {
content: '\00d7';
background: $modal-inner-background;
border-radius: $modal-border-radius;
padding: 2px 8px;
font-size: 1.2em;
text-decoration: none;
text-indent: 0;
}
}
// For small screens adjust the modal
@media screen and (max-width: $modal-small-breakpoint) {
.modal-close:before {
background: $modal-mobile-header;
height: 3em;
-webkit-box-shadow: 0 0 5px rgba(0,0,0,0.6);
box-shadow: 0 0 5px rgba(0,0,0,0.6);
}
.modal-inner {
padding-top: 3em;
-webkit-box-shadow: none;
box-shadow: none;
}
.modal-close {
text-decoration: none;
&:after {
content: attr(data-close);
font-size: 1em;
padding: 0.5em 1em;
}
}
}
}
/*
* Plain Screen Theme Styles
*/
%modal-theme-plainScreen {
.modal-inner {
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
}
// A close button
.modal-close {
// Background as close
&:before {
background: $modal-plain-screen-overlay;
}
&:after {
-webkit-box-shadow: 0px -4px 8px -1px rgba(0, 0, 0, 0.25);
box-shadow: 0px -4px 8px -1px rgba(0, 0, 0, 0.25);
}
}
}