/
_modal.scss
240 lines (203 loc) · 4.37 KB
/
_modal.scss
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
.modal {
// Positioning
position: absolute;
left: 50%;
top: 0;
margin: 10px;
margin-left: -300px;
max-width: 600px;
z-index: 11000;
@include breakpoint(ant) {
left: 0;
margin-left: 10px;
}
// Styling
background: white;
border-radius: 5px;
box-shadow: 0 0px 4px rgba(black, 0.7);
// Hidden on load
display: none;
// Hack to get margin at the bottom
.spacer {
height: 10px;
margin: 0 0 -10px 0;
background: transparent;
}
}
// A modal section consist of a header area and a content area
.modal-section {
.header {
background-color: whitesmoke;
margin-top: 10px;
padding: 10px 20px 5px 20px;
border-bottom: 1px solid #ddd;
border-top: 1px solid #ddd;
position: relative;
overflow: hidden;
h2 {
font-weight: bold;
text-align: left;
opacity: 0.8;
@include breakpoint(ant) { font-size: 1.4em; }
}
}
// Curve corners and remove border-top for the first modal-section
&:first-child .header {
border-radius: 5px 5px 0 0;
border-top: 0;
margin-top: 0;
}
.content {
padding: 15px 20px;
li {
margin-left: 20px;
}
p {
margin-bottom: 10px;
&:last-child {
margin-bottom: 0;
}
}
}
}
// Background fading
#lean_overlay {
display: none;
position: fixed;
z-index: 100;
top: 0;
left: 0;
height: 100%;
width: 100%;
background: black;
}
// Close button
.modal_close {
position: absolute;
display: block;
top: 10px;
right: 17px;
width: 14px;
height: 14px;
z-index: 2;
cursor: pointer;
font-size: 1.5em;
opacity: 0.6;
&:hover {
opacity: 0.9;
}
}
// Trigger button
#about-button {
text-decoration: none;
}
// The 'well' element (used in 'talk to us' and 'other sites')
.well {
border-radius: 5px;
padding: 10px;
transition: 0.15s ease;
display: block;
p {
color: black;
margin-bottom: 0;
}
h3 {
color: black;
}
.img {
position: relative;
width: 50px;
height: 50px;
margin: 4px 10px 0 0;
opacity: 0.8;
float: left;
// The ':after' pseudo elements are used for sprite fading
// Remember to add a background-image to each picture
&:after {
content: "";
position: absolute;
top: 0; left: 0; bottom: 0; right: 0;
opacity: 0;
transition: opacity 0.15s ease-in-out;
}
}
i {
width: 50px;
height: 50px;
margin: 4px 10px 0 0;
opacity: 0.6;
font-size: 3em;
float: left;
}
&:hover {
background-color: #eee;
// Add a hover effect to the wells (color version of the images)
.img:after {
opacity: 1;
}
i {
opacity: .9;
}
}
}
// About Instabart (modal section)
.protip i {
display: inline;
position: relative;
top: 2px;
text-shadow: none;
}
// Talk to us (modal section)
.social .well i {
display: inline;
position: relative;
top: 5px;
font-size: 3em;
opacity: 0.5;
transition: 0.15s ease;
margin-right: 10px;
float: left;
}
.well:hover {
.twitter { opacity: 1; color: rgba(83, 149, 174, 0.9); }
.github { opacity: 1; color: rgba(151, 53, 53, 0.9); }
.emailcircle { opacity: 1; color: rgba(108, 150, 58, 0.9); }
}
// Other sites (modal section)
// .bartebuss { background: url(../../../img/bartebuss-sprite-1x.png); }
// .bartebuss:after { background: url(../../../img/bartebuss-sprite-1x.png) 0 50px; }
.notifier { background: url(../../../img/notifier-sprite-1x.png); }
.notifier:after { background: url(../../../img/notifier-sprite-1x.png) 0 50px; }
// On retina screens, use higher resolution
@media
(-webkit-min-device-pixel-ratio: 1.5),
(min-resolution: 144dpi) {
// .bartebuss { background: url(../../../img/bartebuss-sprite-2x.png); }
// .bartebuss:after { background: url(../../../img/bartebuss-sprite-2x.png) 0 50px; }
.notifier { background: url(../../../img/notifier-sprite-2x.png); }
.notifier:after { background: url(../../../img/notifier-sprite-2x.png) 0 50px; }
// .bartebuss, .bartebuss:after,
.notifier, .notifier:after {
background-size: 50px 100px;
}
}
// SCHEDULE MODAL
#schedule_settings {
max-width: 400px;
margin-left: -200px;
@include breakpoint(ant) {
left: 50%;
}
@include breakpoint(tiny_m) {
left: 0;
margin-left: 10px;
}
.annotation {
color: #777;
font-size: 0.8em;
i {
display: inline;
color: #777;
}
}
}