1
|
// =============================================================================
|
2
|
// Normalize.scss settings
|
3
|
// =============================================================================
|
4
|
|
5
|
// Set to false if you want to drop support for IE6 and IE7
|
6
|
// Notice: setting to false might render some elements
|
7
|
// slightly differently than when set to true
|
8
|
|
9
|
$support-for-ie6-and-ie7: false;
|
10
|
|
11
|
// =============================================================================
|
12
|
// HTML5 display definitions
|
13
|
// =============================================================================
|
14
|
|
15
|
// Corrects block display not defined in IE6/7/8/9 & FF3
|
16
|
|
17
|
article,
|
18
|
aside,
|
19
|
details,
|
20
|
figcaption,
|
21
|
figure,
|
22
|
footer,
|
23
|
header,
|
24
|
hgroup,
|
25
|
nav,
|
26
|
section,
|
27
|
summary {
|
28
|
display: block;
|
29
|
}
|
30
|
|
31
|
// Corrects inline-block display not defined in IE6/7/8/9 & FF3
|
32
|
|
33
|
audio,
|
34
|
canvas,
|
35
|
video {
|
36
|
display: inline-block;
|
37
|
@if $support-for-ie6-and-ie7 {
|
38
|
*display: inline;
|
39
|
*zoom: 1;
|
40
|
}
|
41
|
}
|
42
|
|
43
|
// 1. Prevents modern browsers from displaying 'audio' without controls
|
44
|
// 2. Remove excess height in iOS5 devices
|
45
|
|
46
|
audio:not([controls]) {
|
47
|
display: none; // 1
|
48
|
height: 0; // 2
|
49
|
}
|
50
|
|
51
|
// Addresses styling for 'hidden' attribute not present in IE7/8/9, FF3, S4
|
52
|
// Known issue: no IE6 support
|
53
|
|
54
|
[hidden] {
|
55
|
display: none;
|
56
|
}
|
57
|
|
58
|
// =============================================================================
|
59
|
// Base
|
60
|
// =============================================================================
|
61
|
|
62
|
// 1. Corrects text resizing oddly in IE6/7 when body font-size is set using em units
|
63
|
// http://clagnut.com/blog/348/#c790
|
64
|
// 2. Prevents iOS text size adjust after orientation change, without disabling user zoom
|
65
|
// www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/
|
66
|
|
67
|
html {
|
68
|
@if $support-for-ie6-and-ie7 {
|
69
|
font-size: 100%; // 1
|
70
|
}
|
71
|
-webkit-text-size-adjust: 100%; // 2
|
72
|
-ms-text-size-adjust: 100%; // 2
|
73
|
}
|
74
|
|
75
|
// Addresses font-family inconsistency between 'textarea' and other form elements.
|
76
|
|
77
|
html,
|
78
|
button,
|
79
|
input,
|
80
|
select,
|
81
|
textarea {
|
82
|
font-family: sans-serif;
|
83
|
}
|
84
|
|
85
|
// Addresses margins handled incorrectly in IE6/7
|
86
|
|
87
|
body {
|
88
|
margin: 0;
|
89
|
}
|
90
|
|
91
|
// =============================================================================
|
92
|
// Typography
|
93
|
// =============================================================================
|
94
|
|
95
|
// Addresses font sizes and margins set differently in IE6/7
|
96
|
// Addresses font sizes within 'section' and 'article' in FF4+, Chrome, S5
|
97
|
|
98
|
h1 {
|
99
|
font-size: 2em;
|
100
|
margin: 0.67em 0;
|
101
|
}
|
102
|
|
103
|
#header h1 {
|
104
|
margin: 0 0;
|
105
|
}
|
106
|
|
107
|
h2 {
|
108
|
font-size: 1.5em;
|
109
|
margin: 0.83em 0;
|
110
|
}
|
111
|
|
112
|
h3 {
|
113
|
font-size: 1.17em;
|
114
|
margin: 1em 0;
|
115
|
}
|
116
|
|
117
|
h4 {
|
118
|
font-size: 1em;
|
119
|
margin: 1.33em 0;
|
120
|
}
|
121
|
|
122
|
h5 {
|
123
|
font-size: 0.83em;
|
124
|
margin: 1.67em 0;
|
125
|
}
|
126
|
|
127
|
h6 {
|
128
|
font-size: 0.75em;
|
129
|
margin: 2.33em 0;
|
130
|
}
|
131
|
|
132
|
// Addresses styling not present in IE7/8/9, S5, Chrome
|
133
|
|
134
|
abbr[title] {
|
135
|
border-bottom: 1px dotted;
|
136
|
}
|
137
|
|
138
|
// Addresses style set to 'bolder' in FF3+, S4/5, Chrome
|
139
|
|
140
|
b,
|
141
|
strong {
|
142
|
font-weight: bold;
|
143
|
}
|
144
|
|
145
|
@if $support-for-ie6-and-ie7 {
|
146
|
blockquote {
|
147
|
margin: 1em 40px;
|
148
|
}
|
149
|
}
|
150
|
|
151
|
// Addresses styling not present in S5, Chrome
|
152
|
|
153
|
dfn {
|
154
|
font-style: italic;
|
155
|
}
|
156
|
|
157
|
// Addresses styling not present in IE6/7/8/9
|
158
|
|
159
|
mark {
|
160
|
background: #ff0;
|
161
|
color: #000;
|
162
|
}
|
163
|
|
164
|
// Addresses margins set differently in IE6/7
|
165
|
@if $support-for-ie6-and-ie7 {
|
166
|
p,
|
167
|
pre {
|
168
|
margin: 1em 0;
|
169
|
}
|
170
|
}
|
171
|
|
172
|
// Corrects font family set oddly in IE6, S4/5, Chrome
|
173
|
// en.wikipedia.org/wiki/User:Davidgothberg/Test59
|
174
|
|
175
|
pre,
|
176
|
code,
|
177
|
kbd,
|
178
|
samp {
|
179
|
font-family: monospace, serif;
|
180
|
@if $support-for-ie6-and-ie7 {
|
181
|
_font-family: 'courier new', monospace;
|
182
|
}
|
183
|
font-size: 1em;
|
184
|
}
|
185
|
|
186
|
// Improves readability of pre-formatted text in all browsers
|
187
|
|
188
|
pre {
|
189
|
white-space: pre;
|
190
|
white-space: pre-wrap;
|
191
|
word-wrap: break-word;
|
192
|
}
|
193
|
|
194
|
// 1. Addresses CSS quotes not supported in IE6/7
|
195
|
// 2. Addresses quote property not supported in S4
|
196
|
|
197
|
// 1
|
198
|
@if $support-for-ie6-and-ie7 {
|
199
|
q {
|
200
|
quotes: none;
|
201
|
}
|
202
|
}
|
203
|
|
204
|
// 2
|
205
|
|
206
|
q:before,
|
207
|
q:after {
|
208
|
content: '';
|
209
|
content: none;
|
210
|
}
|
211
|
|
212
|
small {
|
213
|
font-size: 75%;
|
214
|
}
|
215
|
|
216
|
// Prevents sub and sup affecting line-height in all browsers
|
217
|
// gist.github.com/413930
|
218
|
|
219
|
sub,
|
220
|
sup {
|
221
|
font-size: 75%;
|
222
|
line-height: 0;
|
223
|
position: relative;
|
224
|
vertical-align: baseline;
|
225
|
}
|
226
|
|
227
|
sup {
|
228
|
top: -0.5em;
|
229
|
}
|
230
|
|
231
|
sub {
|
232
|
bottom: -0.25em;
|
233
|
}
|
234
|
|
235
|
// =============================================================================
|
236
|
// Lists
|
237
|
// =============================================================================
|
238
|
|
239
|
// Addresses margins set differently in IE6/7
|
240
|
@if $support-for-ie6-and-ie7 {
|
241
|
dl,
|
242
|
menu,
|
243
|
ol,
|
244
|
ul {
|
245
|
margin: 0;
|
246
|
padding: 0;
|
247
|
}
|
248
|
}
|
249
|
|
250
|
@if $support-for-ie6-and-ie7 {
|
251
|
dd {
|
252
|
margin: 0 0 0 40px;
|
253
|
}
|
254
|
}
|
255
|
|
256
|
// Addresses paddings set differently in IE6/7
|
257
|
@if $support-for-ie6-and-ie7 {
|
258
|
menu,
|
259
|
ol,
|
260
|
ul {
|
261
|
padding: 0 0 0 40px;
|
262
|
}
|
263
|
}
|
264
|
|
265
|
// Corrects list images handled incorrectly in IE7
|
266
|
|
267
|
nav {
|
268
|
ul,
|
269
|
ol {
|
270
|
list-style: none;
|
271
|
padding: 0;
|
272
|
@if $support-for-ie6-and-ie7 {
|
273
|
list-style-image: none;
|
274
|
}
|
275
|
}
|
276
|
}
|
277
|
|
278
|
// =============================================================================
|
279
|
// Embedded content
|
280
|
// =============================================================================
|
281
|
|
282
|
// 1. Removes border when inside 'a' element in IE6/7/8/9, FF3
|
283
|
// 2. Improves image quality when scaled in IE7
|
284
|
// code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
|
285
|
|
286
|
img {
|
287
|
border: 0; // 1
|
288
|
@if $support-for-ie6-and-ie7 {
|
289
|
-ms-interpolation-mode: bicubic; // 2
|
290
|
}
|
291
|
}
|
292
|
|
293
|
// Corrects overflow displayed oddly in IE9
|
294
|
|
295
|
svg:not(:root) {
|
296
|
overflow: hidden;
|
297
|
}
|
298
|
|
299
|
// =============================================================================
|
300
|
// Figures
|
301
|
// =============================================================================
|
302
|
|
303
|
// Addresses margin not present in IE6/7/8/9, S5, O11
|
304
|
|
305
|
figure {
|
306
|
margin: 0;
|
307
|
}
|
308
|
|
309
|
// =============================================================================
|
310
|
// Forms
|
311
|
// =============================================================================
|
312
|
|
313
|
// Corrects margin displayed oddly in IE6/7
|
314
|
@if $support-for-ie6-and-ie7 {
|
315
|
form {
|
316
|
margin: 0;
|
317
|
}
|
318
|
}
|
319
|
|
320
|
// Define consistent border, margin, and padding
|
321
|
|
322
|
fieldset {
|
323
|
border: 1px solid #c0c0c0;
|
324
|
margin: 0 2px;
|
325
|
padding: 0.35em 0.625em 0.75em;
|
326
|
}
|
327
|
|
328
|
// 1. Corrects color not being inherited in IE6/7/8/9
|
329
|
// 2. Corrects text not wrapping in FF3
|
330
|
// 3. Corrects alignment displayed oddly in IE6/7
|
331
|
|
332
|
legend {
|
333
|
border: 0; // 1
|
334
|
padding: 0;
|
335
|
white-space: normal; // 2
|
336
|
@if $support-for-ie6-and-ie7 {
|
337
|
*margin-left: -7px; // 3
|
338
|
}
|
339
|
}
|
340
|
|
341
|
// 1. Corrects font size not being inherited in all browsers
|
342
|
// 2. Addresses margins set differently in IE6/7, FF3+, S5, Chrome
|
343
|
// 3. Improves appearance and consistency in all browsers
|
344
|
|
345
|
button,
|
346
|
input,
|
347
|
select,
|
348
|
textarea {
|
349
|
font-size: 100%; // 1
|
350
|
margin: 0; // 2
|
351
|
vertical-align: baseline; // 3
|
352
|
@if $support-for-ie6-and-ie7 {
|
353
|
*vertical-align: middle; // 3
|
354
|
}
|
355
|
}
|
356
|
|
357
|
// Addresses FF3/4 setting line-height on 'input' using !important in the UA stylesheet
|
358
|
|
359
|
button,
|
360
|
input {
|
361
|
line-height: normal; // 1
|
362
|
}
|
363
|
|
364
|
// 1. Improves usability and consistency of cursor style between image-type 'input' and others
|
365
|
// 2. Corrects inability to style clickable 'input' types in iOS
|
366
|
// 3. Removes inner spacing in IE7 without affecting normal text inputs
|
367
|
// Known issue: inner spacing remains in IE6
|
368
|
|
369
|
button,
|
370
|
input[type="button"],
|
371
|
input[type="reset"],
|
372
|
input[type="submit"] {
|
373
|
cursor: pointer; // 1
|
374
|
-webkit-appearance: button; // 2
|
375
|
@if $support-for-ie6-and-ie7 {
|
376
|
*overflow: visible; // 3
|
377
|
}
|
378
|
}
|
379
|
|
380
|
// Re-set default cursor for disabled elements
|
381
|
|
382
|
button[disabled],
|
383
|
input[disabled] {
|
384
|
cursor: default;
|
385
|
}
|
386
|
|
387
|
// 1. Addresses box sizing set to content-box in IE8/9
|
388
|
// 2. Removes excess padding in IE8/9
|
389
|
// 3. Removes excess padding in IE7
|
390
|
// Known issue: excess padding remains in IE6
|
391
|
|
392
|
input[type="checkbox"],
|
393
|
input[type="radio"] {
|
394
|
box-sizing: border-box; // 1
|
395
|
padding: 0; // 2
|
396
|
@if $support-for-ie6-and-ie7 {
|
397
|
*height: 13px; // 3
|
398
|
*width: 13px; // 3
|
399
|
}
|
400
|
}
|
401
|
|
402
|
// 1. Addresses appearance set to searchfield in S5, Chrome
|
403
|
// 2. Addresses box-sizing set to border-box in S5, Chrome (include -moz to future-proof)
|
404
|
// 3. Removes inner padding and search cancel button in S5, Chrome on OS X
|
405
|
|
406
|
input[type="search"] {
|
407
|
-webkit-appearance: textfield; // 1
|
408
|
-moz-box-sizing: content-box;
|
409
|
-webkit-box-sizing: content-box; // 2
|
410
|
box-sizing: content-box;
|
411
|
&::-webkit-search-decoration, &::-webkit-search-cancel-button { // 3
|
412
|
-webkit-appearance: none;
|
413
|
}
|
414
|
}
|
415
|
|
416
|
// Removes inner padding and border in FF3+
|
417
|
// www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/
|
418
|
|
419
|
button, input {
|
420
|
&::-moz-focus-inner {
|
421
|
border: 0;
|
422
|
padding: 0;
|
423
|
}
|
424
|
}
|
425
|
|
426
|
// 1. Removes default vertical scrollbar in IE6/7/8/9
|
427
|
// 2. Improves readability and alignment in all browsers
|
428
|
|
429
|
textarea {
|
430
|
overflow: auto; // 1
|
431
|
vertical-align: top; // 2
|
432
|
}
|
433
|
|
434
|
// =============================================================================
|
435
|
// Tables
|
436
|
// =============================================================================
|
437
|
|
438
|
// Remove most spacing between table cells
|
439
|
|
440
|
table {
|
441
|
border-collapse: collapse;
|
442
|
border-spacing: 0;
|
443
|
}
|