1
- /* LE BOILERPLATE, Nicolas Gallagher 2011-07-15T17:39 UTC · http://github.com/necolas/le-boilerplate */
1
+ /* 2011-08-13T01:25 UTC · http://github.com/necolas/le-boilerplate */
2
2
3
3
/*
4
4
* ALL MEDIA
7
7
* PRINT
8
8
*/
9
9
10
- /* ============================================================================================================= ALL */
11
10
12
- /*
13
- * Styles affecting all viewport widths and print (keep linear and fluid)
14
- */
11
+ /* ============================================================================ HTML5 ELEMENT DISPLAY */
15
12
16
- /* ============================================================================= HTML5 ELEMENT DISPLAY */
17
-
18
- header ,
19
- section ,
20
- article ,
21
- aside ,
13
+ article ,
14
+ aside ,
15
+ details ,
16
+ figcaption ,
17
+ figure ,
22
18
footer ,
23
- nav ,
24
- menu ,
25
- hgroup ,
26
- figure ,
27
- figcaption ,
28
- details ,
29
- summary {
19
+ header ,
20
+ hgroup ,
21
+ nav ,
22
+ section {
30
23
display : block;
31
24
}
32
25
33
- audio [ controls ] ,
26
+ audio ,
34
27
canvas ,
35
28
video {
36
29
display : inline-block;
37
30
* display : inline;
38
31
* zoom : 1 ;
39
32
}
40
33
34
+ audio : not ([controls ]) {
35
+ display : none;
36
+ }
37
+
38
+ [hidden ] {
39
+ display : none;
40
+ }
41
+
41
42
42
- /* ============================================================================= BASE */
43
+ /* ============================================================================ BASE */
43
44
44
45
/*
45
46
* 1. Prevent text resizing oddly in IE6/7 when body font-size is set using em units
46
47
* 2. Keep page centred in all browsers regardless of content height
47
- * 3. Remove Android and iOS tap highlight color; prevent entire container being highlighted
48
- * 4. Remove iOS text size adjust without disabling user zoom
48
+ * 3. Remove iOS text size adjust without disabling user zoom
49
49
*/
50
50
51
51
html {
52
52
font-size : 100% ; /* 1 */
53
53
overflow-y : scroll; /* 2 */
54
- -webkit-tap-highlight-color : rgba (0 , 0 , 0 , 0 ); /* 3 */
55
- -webkit-text-size-adjust : 100% ; /* 4 */
56
- -ms-text-size-adjust : 100% ; /* 4 */
54
+ -webkit-text-size-adjust : 100% ; /* 3 */
55
+ -ms-text-size-adjust : 100% ; /* 3 */
57
56
}
58
57
59
58
/*
60
- * N.B. Add a max-width to body/container as a fallback in certain desktop environments
59
+ * N.B. Add a max-width to body/container as a fallback in desktop environments with
60
+ * no Media Query support or polyfill
61
61
*/
62
62
63
63
body {
64
64
margin : 0 ;
65
- font-size : 0.875 em ; /* 14px */
65
+ font-size : 1 em ; /* 16px */
66
66
line-height : 1.4 ;
67
67
background : # fff ;
68
68
}
@@ -78,22 +78,21 @@ textarea {
78
78
79
79
/*
80
80
* Remove selection highlight text-shadow to ensure readability is not compromised
81
+ * Set selection highlight background to match OSX default
81
82
*/
82
83
83
84
::-moz-selection {
84
85
text-shadow : none;
85
- color : # fff ;
86
- background : # ff5e99 ;
86
+ background : # b3d4fc ;
87
87
}
88
88
89
89
::selection {
90
90
text-shadow : none;
91
- color : # fff ;
92
- background : # ff5e99 ;
91
+ background : # b3d4fc ;
93
92
}
94
93
95
94
96
- /* ============================================================================= LINKS */
95
+ /* ============================================================================ LINKS */
97
96
98
97
a ,
99
98
a : visited {
@@ -122,7 +121,7 @@ a:active {
122
121
}
123
122
124
123
125
- /* ============================================================================= TYPOGRAPHY */
124
+ /* ============================================================================ TYPOGRAPHY */
126
125
127
126
h1 {}
128
127
h2 {}
139
138
margin : 1.4em 0 ;
140
139
}
141
140
142
- /* ............................................................................. Lists */
141
+ /* ............................................................................ Lists */
143
142
144
143
ul ,
145
144
ol {
@@ -164,7 +163,7 @@ nav li {
164
163
margin : 0 ;
165
164
}
166
165
167
- /* ............................................................................. Inline */
166
+ /* ............................................................................ Inline */
168
167
169
168
abbr [title ] {
170
169
border-bottom : 1px dotted;
219
218
code ,
220
219
kbd ,
221
220
samp {
222
- font-family : monospace, monospace ;
223
- _font-family : 'Courier New' , monospace ;
221
+ font-family : monospace, serif ;
222
+ _font-family : 'Courier New' , serif ;
224
223
font-size : 1em ;
225
224
}
226
225
@@ -239,7 +238,6 @@ small {
239
238
240
239
/*
241
240
* Prevent sub and sup affecting line-height in all browsers
242
- * gist.github.com/413930
243
241
*/
244
242
245
243
sup ,
@@ -259,12 +257,11 @@ sub {
259
257
}
260
258
261
259
262
- /* ============================================================================= EMBEDDED CONTENT */
260
+ /* ============================================================================ EMBEDDED CONTENT */
263
261
264
262
/*
265
263
* 1. Remove border when inside 'a' element in IE6/7/8/9
266
264
* 2. Improve image quality when scaled in IE7
267
- * code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
268
265
*/
269
266
270
267
img {
@@ -281,7 +278,14 @@ svg:not(:root) {
281
278
}
282
279
283
280
284
- /* ============================================================================= FORMS */
281
+ /* ============================================================================ FORMS */
282
+
283
+ figure {
284
+ margin : 0 ;
285
+ }
286
+
287
+
288
+ /* ============================================================================ FORMS */
285
289
286
290
form {
287
291
margin : 0 ;
@@ -300,26 +304,28 @@ legend {
300
304
301
305
/*
302
306
* 1. Remove extra inner space from 'input' and 'button' in IE6/7
303
- * 2. Remove margins from form elements
304
- * 3. Make font-size equal to ancestor's
305
- * 4. Have all browsers use the same line-height.
306
- * 5. Remove :focus outline offset in WebKit
307
- * 6. Standardise vertical-align
307
+ * 2. Make font-size equal to ancestor's
308
+ * 3. Have all browsers use the same line-height.
309
+ * 4. Standardise vertical-align
308
310
*/
309
311
310
312
button ,
311
313
input ,
312
314
select ,
313
315
textarea {
314
316
overflow : visible; /* 1 */
315
- margin : 0 ; /* 2 */
316
- font-size : 100% ; /* 3 */
317
- line-height : normal; /* 4 */
318
- outline-offset : 0 ; /* 5 */
319
- vertical-align : baseline; /* 6 */
317
+ margin : 0 ;
318
+ font-size : 100% ; /* 2 */
319
+ line-height : normal; /* 3 */
320
+ vertical-align : baseline; /* 4 */
320
321
* vertical-align : middle;
321
322
}
322
323
324
+ table button ,
325
+ table input {
326
+ * overflow : auto;
327
+ }
328
+
323
329
/*
324
330
* 1. Display hand cursor for submission elements
325
331
* 2. Fix inability to style clickable 'input' types in iOS
@@ -340,18 +346,21 @@ input[type="submit"] {
340
346
input [type = "checkbox" ],
341
347
input [type = "radio" ] {
342
348
box-sizing : border-box;
349
+ padding : 0 ;
343
350
}
344
351
345
352
/*
346
- * 1. Fix ability to fully style search inputs in WebKit browsers
353
+ * 1. Fix inability to fully style search inputs in WebKit browsers
347
354
* 2. Fix box sizing set to border-box in S5, Chrome
355
+ * 3. Set outline offset to match other textfields
348
356
*/
349
357
350
358
input [type = "search" ] {
351
359
-webkit-appearance : textfield; /* 1 */
352
360
-moz-box-sizing : content-box;
353
361
-webkit-box-sizing : content-box; /* 2 */
354
362
box-sizing : content-box;
363
+ outline-offset : -2px ; /* 3 */
355
364
}
356
365
357
366
/*
@@ -385,7 +394,7 @@ textarea {
385
394
}
386
395
387
396
388
- /* ============================================================================= TABLES */
397
+ /* ============================================================================ TABLES */
389
398
390
399
/*
391
400
* Remove most spacing between table cells
@@ -406,13 +415,12 @@ td {
406
415
}
407
416
408
417
409
- /* ============================================================================= HELPER CLASSES */
418
+ /* ============================================================================ HELPER CLASSES */
410
419
411
- /* ............................................................................. Clearfix */
420
+ /* ............................................................................ Clearfix */
412
421
413
422
/*
414
423
* Clear an element's floated children using generated content
415
- * nicolasgallagher.com/micro-clearfix-hack/
416
424
*/
417
425
418
426
.cf {
429
437
clear : both;
430
438
}
431
439
432
- /* ............................................................................. Hidden */
440
+ /* ............................................................................ Hidden */
433
441
434
442
/*
435
443
* Hide visually and for screenreaders
441
449
}
442
450
443
451
444
- /* ============================================================================= COMPONENTS */
452
+ /* ============================================================================ COMPONENTS */
445
453
446
454
447
455
@@ -452,12 +460,12 @@ td {
452
460
453
461
454
462
455
- /* ============================================================================================================= SCREEN (480+) */
463
+ /* ========================================================================================================== SCREEN (480+) */
456
464
457
465
@media screen and (min-width : 480px ) {
458
466
459
467
/*
460
- * Screen-only style adjustmenets for viewport widths 480px to 780px
468
+ * Screen-only style adjustmenets for viewport widths 480px to 768px
461
469
*/
462
470
463
471
467
475
468
476
469
477
470
- /* ============================================================================================================= SCREEN (768+) */
478
+ /* ========================================================================================================== SCREEN (768+) */
471
479
472
480
@media screen and (min-width : 768px ) {
473
481
482
490
483
491
484
492
485
- /* ============================================================================================================= PRINT */
493
+ /* ========================================================================================================== PRINT */
486
494
487
495
@media print {
488
496
0 commit comments