normalize-scss 3.0.3 → 4.0.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "normalize-scss",
3
+ "version": "4.0.0-beta.1",
4
+ "description": "This is the Sass version of Normalize.css, a collection of HTML element and attribute rulesets to normalize styles across all browsers. This port aims to use a light dusting of Sass to make Normalize even easier to integrate with your website.",
5
+ "homepage": "https://github.com/JohnAlbin/normalize-scss",
6
+ "bugs": {
7
+ "url": "https://github.com/JohnAlbin/normalize-scss/issues"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git://github.com/JohnAlbin/normalize-scss.git"
12
+ },
13
+ "author": "John Albin Wilkins <virtually.johnalbin@gmail.com> (http://john.albin.net/)",
14
+ "keywords": [
15
+ "sass",
16
+ "normalize"
17
+ ],
18
+ "main": "sass/_normalize.scss",
19
+ "style": "sass/_normalize.scss",
20
+ "eyeglass": {
21
+ "exports": "eyeglass-exports.js"
22
+ },
23
+ "files": [
24
+ "LICENSE.md",
25
+ "sass/_normalize.scss"
26
+ ],
27
+ "directories": {
28
+ "test": "test"
29
+ },
30
+ "scripts": {
31
+ "test": "mocha",
32
+ "posttest": "eslint test"
33
+ },
34
+ "license": "(MIT OR GPL-2.0)",
35
+ "dependencies": {
36
+ "support-for": "^1.0.0"
37
+ },
38
+ "devDependencies": {
39
+ "chai": "^3.4.1",
40
+ "eslint": "^1.9.0",
41
+ "mocha": "^2.3.4",
42
+ "sassy-test": "^2.0.0"
43
+ }
44
+ }
@@ -0,0 +1,4 @@
1
+ @import 'support-for';
2
+ @import 'normalize/variables';
3
+ @import 'normalize/vertical-rhythm';
4
+ @import 'normalize/normalize-mixin';
@@ -0,0 +1,11 @@
1
+ // Import Now
2
+ //
3
+ // If you import this module directly, it will immediately output all the CSS
4
+ // needed to normalize default HTML elements across all browsers.
5
+ //
6
+ // ```
7
+ // @import "normalize/import-now";
8
+ // ```
9
+
10
+ @import 'normalize';
11
+ @include normalize();
@@ -0,0 +1,683 @@
1
+ // Helper function for the normalize() mixin.
2
+ $_normalize-include: ();
3
+ $_normalize-exclude: ();
4
+ @function _normalize-include($section) {
5
+ // Check if $section is in the $include list.
6
+ @if index($_normalize-include, $section) {
7
+ @return true;
8
+ }
9
+ // If $include is set to (all), make sure $section is not in $exclude.
10
+ @else if not index($_normalize-exclude, $section) and index($_normalize-include, all) {
11
+ @return true;
12
+ }
13
+ @return false;
14
+ }
15
+
16
+ @mixin normalize($include: (all), $exclude: ()) {
17
+ // If we had local functions, we could access our parameters inside the
18
+ // function without passing them in as parameters. The hacky work-around is to
19
+ // stuff them into global variables so can access them from a global function.
20
+ $_normalize-include: if(type-of($include) == 'list', $include, ($include)) !global;
21
+ $_normalize-exclude: if(type-of($exclude) == 'list', $exclude, ($exclude)) !global;
22
+
23
+ // If we've customized any font variables, we'll need extra properties.
24
+ @if $base-font-size != 16px
25
+ or $base-line-height != 24px
26
+ or $base-unit != 'em'
27
+ or $h1-font-size != 2 * $base-font-size
28
+ or $h2-font-size != 1.5 * $base-font-size
29
+ or $h3-font-size != 1.17 * $base-font-size
30
+ or $h4-font-size != 1 * $base-font-size
31
+ or $h5-font-size != 0.83 * $base-font-size
32
+ or $h6-font-size != 0.67 * $base-font-size
33
+ or $indent-amount != 40px {
34
+ $normalize-vertical-rhythm: true !global;
35
+ }
36
+
37
+ /*! normalize-scss | MIT/GPLv2 License | bit.ly/normalize-scss */
38
+
39
+ @if _normalize-include(root) {
40
+ /**
41
+ * 1. Set default font family to sans-serif.
42
+ * 2. Prevent iOS and IE text size adjust after device orientation change,
43
+ * without disabling user zoom.
44
+ */
45
+
46
+ html {
47
+ @if $normalize-vertical-rhythm or support-for(ie, 7) {
48
+ // Correct text resizing oddly in IE 6/7 when body `font-size` is set using
49
+ // `em` units.
50
+ font-size: ($base-font-size / 16px) * 100%;
51
+ }
52
+ @if $normalize-vertical-rhythm {
53
+ line-height: ($base-line-height / $base-font-size) * 1em;
54
+ }
55
+ font-family: $base-font-family; /* 1 */
56
+ -ms-text-size-adjust: 100%; /* 2 */
57
+ -webkit-text-size-adjust: 100%; /* 2 */
58
+ }
59
+
60
+ /**
61
+ * Remove default margin.
62
+ */
63
+
64
+ body {
65
+ margin: 0;
66
+ }
67
+ }
68
+
69
+ @if _normalize-include(html5) {
70
+ /* HTML5 display definitions
71
+ ========================================================================== */
72
+
73
+ /**
74
+ * Correct `block` display not defined for any HTML5 element in IE 8/9.
75
+ * Correct `block` display not defined for `details` or `summary` in IE 10/11
76
+ * and Firefox.
77
+ * Correct `block` display not defined for `main` in IE 11.
78
+ */
79
+
80
+ article,
81
+ aside,
82
+ details,
83
+ figcaption,
84
+ figure,
85
+ footer,
86
+ header,
87
+ hgroup,
88
+ main,
89
+ menu,
90
+ nav,
91
+ section,
92
+ summary {
93
+ display: block;
94
+ }
95
+
96
+ /**
97
+ * 1. Correct `inline-block` display not defined in IE 8/9.
98
+ * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
99
+ */
100
+
101
+ audio,
102
+ canvas,
103
+ progress,
104
+ video {
105
+ @if support-for(ie, 9) {
106
+ display: inline-block; /* 1 */
107
+ @if support-for(ie, 7) {
108
+ *display: inline;
109
+ *zoom: 1;
110
+ }
111
+ }
112
+ vertical-align: baseline; /* 2 */
113
+ }
114
+
115
+ /**
116
+ * Prevent modern browsers from displaying `audio` without controls.
117
+ * Remove excess height in iOS 5 devices.
118
+ */
119
+
120
+ audio:not([controls]) {
121
+ display: none;
122
+ height: 0;
123
+ }
124
+
125
+ @if support-for(ie, 10) {
126
+ /**
127
+ * Address `[hidden]` styling not present in IE 8/9/10.
128
+ */
129
+
130
+ [hidden] {
131
+ display: none;
132
+ }
133
+ }
134
+
135
+ /**
136
+ * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.
137
+ */
138
+
139
+ template {
140
+ display: none;
141
+ }
142
+ }
143
+
144
+ @if _normalize-include(links) {
145
+ /* Links
146
+ ========================================================================== */
147
+
148
+ @if support-for(ie, 10) {
149
+ /**
150
+ * Remove the gray background color from active links in IE 10.
151
+ */
152
+
153
+ a {
154
+ background-color: transparent;
155
+ }
156
+ }
157
+
158
+ /**
159
+ * Improve readability of focused elements when they are also in an
160
+ * active/hover state.
161
+ */
162
+
163
+ a:active,
164
+ a:hover {
165
+ outline: 0;
166
+ }
167
+ }
168
+
169
+ @if _normalize-include(text) {
170
+ /* Text-level semantics
171
+ ========================================================================== */
172
+
173
+ /**
174
+ * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
175
+ */
176
+
177
+ abbr[title] {
178
+ border-bottom: 1px dotted;
179
+ }
180
+
181
+ /**
182
+ * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
183
+ */
184
+
185
+ b,
186
+ strong {
187
+ font-weight: bold;
188
+ }
189
+
190
+ @if $normalize-vertical-rhythm or support-for(ie, 7) {
191
+ /**
192
+ * Set 1 unit of vertical rhythm on the top and bottom margin.
193
+ */
194
+
195
+ blockquote {
196
+ @include normalize-margin(1 $indent-amount);
197
+ }
198
+ }
199
+
200
+ /**
201
+ * Address styling not present in Safari and Chrome.
202
+ */
203
+
204
+ dfn {
205
+ font-style: italic;
206
+ }
207
+
208
+ /**
209
+ * Address variable `h1` font-size and margin within `section` and `article`
210
+ * contexts in Firefox 4+, Safari, and Chrome.
211
+ */
212
+
213
+ h1 {
214
+ @include normalize-font-size($h1-font-size);
215
+ @if $normalize-vertical-rhythm {
216
+ @include normalize-line-height($h1-font-size);
217
+ }
218
+
219
+ /* Set 1 unit of vertical rhythm on the top and bottom margins. */
220
+ @include normalize-margin(1 0, $h1-font-size);
221
+ }
222
+
223
+ @if $normalize-vertical-rhythm or support-for(ie, 7) {
224
+ h2 {
225
+ @include normalize-font-size($h2-font-size);
226
+ @if $normalize-vertical-rhythm {
227
+ @include normalize-line-height($h2-font-size);
228
+ }
229
+ @include normalize-margin(1 0, $h2-font-size);
230
+ }
231
+
232
+ h3 {
233
+ @include normalize-font-size($h3-font-size);
234
+ @if $normalize-vertical-rhythm {
235
+ @include normalize-line-height($h3-font-size);
236
+ }
237
+ @include normalize-margin(1 0, $h3-font-size);
238
+ }
239
+
240
+ h4 {
241
+ @include normalize-font-size($h4-font-size);
242
+ @if $normalize-vertical-rhythm {
243
+ @include normalize-line-height($h4-font-size);
244
+ }
245
+ @include normalize-margin(1 0, $h4-font-size);
246
+ }
247
+
248
+ h5 {
249
+ @include normalize-font-size($h5-font-size);
250
+ @if $normalize-vertical-rhythm {
251
+ @include normalize-line-height($h5-font-size);
252
+ }
253
+ @include normalize-margin(1 0, $h5-font-size);
254
+ }
255
+
256
+ h6 {
257
+ @include normalize-font-size($h6-font-size);
258
+ @if $normalize-vertical-rhythm {
259
+ @include normalize-line-height($h6-font-size);
260
+ }
261
+ @include normalize-margin(1 0, $h6-font-size);
262
+ }
263
+ }
264
+
265
+ @if support-for(ie, 9) {
266
+ /**
267
+ * Address styling not present in IE 8/9.
268
+ */
269
+
270
+ mark {
271
+ background: #ff0;
272
+ color: #000;
273
+ }
274
+ }
275
+
276
+ @if $normalize-vertical-rhythm or support-for(ie, 7) {
277
+ /**
278
+ * Set 1 unit of vertical rhythm on the top and bottom margin.
279
+ */
280
+
281
+ p,
282
+ pre {
283
+ @include normalize-margin(1 0);
284
+ }
285
+ }
286
+
287
+ /**
288
+ * Address inconsistent and variable font size in all browsers.
289
+ */
290
+
291
+ small {
292
+ font-size: 80%;
293
+ }
294
+
295
+ /**
296
+ * Prevent `sub` and `sup` affecting `line-height` in all browsers.
297
+ */
298
+
299
+ sub,
300
+ sup {
301
+ font-size: 75%;
302
+ line-height: 0;
303
+ position: relative;
304
+ vertical-align: baseline;
305
+ }
306
+
307
+ sup {
308
+ top: -0.5em;
309
+ }
310
+
311
+ sub {
312
+ bottom: -0.25em;
313
+ }
314
+ }
315
+
316
+ @if _normalize-include(lists) {
317
+ @if $normalize-vertical-rhythm or support-for(ie, 7) {
318
+ /* Lists
319
+ ========================================================================== */
320
+
321
+ /**
322
+ * Address margins set differently in IE 6/7.
323
+ */
324
+
325
+ dl,
326
+ menu,
327
+ ol,
328
+ ul {
329
+ @include normalize-margin(1 0);
330
+ }
331
+ }
332
+
333
+ @if $normalize-vertical-rhythm {
334
+ /**
335
+ * Turn off margins on nested lists.
336
+ */
337
+
338
+ ol,
339
+ ul {
340
+ ol,
341
+ ul {
342
+ margin: 0;
343
+ }
344
+ }
345
+ }
346
+
347
+ @if $normalize-vertical-rhythm or support-for(ie, 7) {
348
+ dd {
349
+ margin: 0 0 0 $indent-amount;
350
+ }
351
+
352
+ /**
353
+ * Address paddings set differently in IE 6/7.
354
+ */
355
+
356
+ menu,
357
+ ol,
358
+ ul {
359
+ padding: 0 0 0 $indent-amount;
360
+ }
361
+ }
362
+
363
+ @if support-for(ie, 7) {
364
+ /**
365
+ * Correct list images handled incorrectly in IE 7.
366
+ */
367
+
368
+ nav ul,
369
+ nav ol {
370
+ list-style: none;
371
+ list-style-image: none;
372
+ }
373
+ }
374
+ }
375
+
376
+ @if _normalize-include(embedded) {
377
+ /* Embedded content
378
+ ========================================================================== */
379
+
380
+ @if support-for(ie, 10) {
381
+ /**
382
+ * Remove border when inside `a` element in IE 8/9/10.
383
+ */
384
+
385
+ img {
386
+ border: 0;
387
+ @if support-for(ie, 7) {
388
+ /* Improve image quality when scaled in IE 7. */
389
+ -ms-interpolation-mode: bicubic;
390
+ }
391
+ }
392
+ }
393
+
394
+ /**
395
+ * Correct overflow not hidden in IE 9/10/11.
396
+ */
397
+
398
+ svg:not(:root) {
399
+ overflow: hidden;
400
+ }
401
+ }
402
+
403
+ @if _normalize-include(grouping) {
404
+ /* Grouping content
405
+ ========================================================================== */
406
+
407
+ @if $normalize-vertical-rhythm or support-for(ie, 9) or support-for(safari, 6) {
408
+ /**
409
+ * Address margin not present in IE 8/9 and Safari.
410
+ */
411
+
412
+ figure {
413
+ @include normalize-margin(1 $indent-amount);
414
+ }
415
+ }
416
+
417
+ /**
418
+ * Address differences between Firefox and other browsers.
419
+ */
420
+
421
+ hr {
422
+ @if support-for(firefox, 28) {
423
+ -moz-box-sizing: content-box;
424
+ }
425
+ box-sizing: content-box;
426
+ height: 0;
427
+ }
428
+
429
+ /**
430
+ * Contain overflow in all browsers.
431
+ */
432
+
433
+ pre {
434
+ overflow: auto;
435
+ }
436
+
437
+ /**
438
+ * Address odd `em`-unit font size rendering in all browsers.
439
+ */
440
+
441
+ code,
442
+ kbd,
443
+ pre,
444
+ samp {
445
+ font-family: monospace, monospace;
446
+ @if support-for(ie, 6) {
447
+ _font-family: 'courier new', monospace;
448
+ }
449
+ font-size: 1em;
450
+ }
451
+ }
452
+
453
+ @if _normalize-include(forms) {
454
+ /* Forms
455
+ ========================================================================== */
456
+
457
+ /**
458
+ * Known limitation: by default, Chrome and Safari on OS X allow very limited
459
+ * styling of `select`, unless a `border` property is set.
460
+ */
461
+
462
+ @if support-for(ie, 7) {
463
+ /**
464
+ * Correct margin displayed oddly in IE 6/7.
465
+ */
466
+
467
+ form {
468
+ margin: 0;
469
+ }
470
+ }
471
+
472
+ /**
473
+ * 1. Correct color not being inherited.
474
+ * Known issue: affects color of disabled elements.
475
+ * 2. Correct font properties not being inherited.
476
+ * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
477
+ * 4. Address `font-family` inconsistency between `textarea` and other form in IE 7
478
+ * 5. Improve appearance and consistency with IE 6/7.
479
+ */
480
+
481
+ button,
482
+ input,
483
+ optgroup,
484
+ select,
485
+ textarea {
486
+ color: inherit; /* 1 */
487
+ font: inherit; /* 2 */
488
+ margin: 0; /* 3 */
489
+ @if support-for(ie, 7) {
490
+ *font-family: $base-font-family; /* 4 */
491
+ *vertical-align: middle; /* 5 */
492
+ }
493
+ }
494
+
495
+ /**
496
+ * Address `overflow` set to `hidden` in IE 8/9/10/11.
497
+ */
498
+
499
+ button {
500
+ overflow: visible;
501
+ }
502
+
503
+ /**
504
+ * Address inconsistent `text-transform` inheritance for `button` and `select`.
505
+ * All other form control elements do not inherit `text-transform` values.
506
+ * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
507
+ * Correct `select` style inheritance in Firefox.
508
+ */
509
+
510
+ button,
511
+ select {
512
+ text-transform: none;
513
+ }
514
+
515
+ /**
516
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
517
+ * and `video` controls.
518
+ * 2. Correct inability to style clickable `input` types in iOS.
519
+ * 3. Improve usability and consistency of cursor style between image-type
520
+ * `input` and others.
521
+ * 4. Remove inner spacing in IE 7 without affecting normal text inputs.
522
+ * Known issue: inner spacing remains in IE 6.
523
+ */
524
+
525
+ button,
526
+ html input[type="button"], /* 1 */
527
+ input[type="reset"],
528
+ input[type="submit"] {
529
+ -webkit-appearance: button; /* 2 */
530
+ cursor: pointer; /* 3 */
531
+ @if support-for(ie, 7) {
532
+ *overflow: visible; /* 4 */
533
+ }
534
+ }
535
+
536
+ /**
537
+ * Re-set default cursor for disabled elements.
538
+ */
539
+
540
+ button[disabled],
541
+ html input[disabled] {
542
+ cursor: default;
543
+ }
544
+
545
+ /**
546
+ * Remove inner padding and border in Firefox 4+.
547
+ */
548
+
549
+ button::-moz-focus-inner,
550
+ input::-moz-focus-inner {
551
+ border: 0;
552
+ padding: 0;
553
+ }
554
+
555
+ /**
556
+ * Address Firefox 4+ setting `line-height` on `input` using `!important` in
557
+ * the UA stylesheet.
558
+ */
559
+
560
+ input {
561
+ line-height: normal;
562
+ }
563
+
564
+ @if support-for(ie, 10) {
565
+ /**
566
+ * It's recommended that you don't attempt to style these elements.
567
+ * Firefox's implementation doesn't respect box-sizing, padding, or width.
568
+ *
569
+ * 1. Address box sizing set to `content-box` in IE 8/9/10.
570
+ * 2. Remove excess padding in IE 8/9/10.
571
+ * 3. Remove excess padding in IE 7.
572
+ * Known issue: excess padding remains in IE 6.
573
+ */
574
+
575
+ input[type="checkbox"],
576
+ input[type="radio"] {
577
+ box-sizing: border-box; /* 1 */
578
+ padding: 0; /* 2 */
579
+ @if support-for(ie, 7) {
580
+ *height: 13px; /* 3 */
581
+ *width: 13px; /* 3 */
582
+ }
583
+ }
584
+ }
585
+
586
+ /**
587
+ * Fix the cursor style for Chrome's increment/decrement buttons. For certain
588
+ * `font-size` values of the `input`, it causes the cursor style of the
589
+ * decrement button to change from `default` to `text`.
590
+ */
591
+
592
+ input[type="number"]::-webkit-inner-spin-button,
593
+ input[type="number"]::-webkit-outer-spin-button {
594
+ height: auto;
595
+ }
596
+
597
+ /**
598
+ * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
599
+ * 2. Address `box-sizing` set to `border-box` in Safari and Chrome.
600
+ */
601
+
602
+ input[type="search"] {
603
+ -webkit-appearance: textfield; /* 1 */
604
+ @if support-for(safari, 5) or support-for(chrome, 9) {
605
+ -webkit-box-sizing: content-box;
606
+ }
607
+ box-sizing: content-box; /* 2 */
608
+
609
+ /**
610
+ * Remove inner padding and search cancel button in Safari and Chrome on OS X.
611
+ * Safari (but not Chrome) clips the cancel button when the search input has
612
+ * padding (and `textfield` appearance).
613
+ */
614
+
615
+ &::-webkit-search-cancel-button,
616
+ &::-webkit-search-decoration {
617
+ -webkit-appearance: none;
618
+ }
619
+ }
620
+
621
+ /**
622
+ * Define consistent border, margin, and padding.
623
+ */
624
+
625
+ fieldset {
626
+ border: 1px solid #c0c0c0;
627
+ margin: 0 2px;
628
+ padding: 0.35em 0.625em 0.75em;
629
+ }
630
+
631
+ /**
632
+ * 1. Correct `color` not being inherited in IE 8/9/10/11.
633
+ * 2. Remove padding so people aren't caught out if they zero out fieldsets.
634
+ * 3. Correct alignment displayed oddly in IE 6/7.
635
+ */
636
+
637
+ legend {
638
+ @if support-for(ie, 11) {
639
+ border: 0; /* 1 */
640
+ }
641
+ padding: 0; /* 2 */
642
+ @if support-for(ie, 7) {
643
+ *margin-left: -7px; /* 3 */
644
+ }
645
+ }
646
+
647
+ /**
648
+ * Remove default vertical scrollbar in IE 8/9/10/11.
649
+ */
650
+
651
+ textarea {
652
+ overflow: auto;
653
+ }
654
+
655
+ /**
656
+ * Don't inherit the `font-weight` (applied by a rule above).
657
+ * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
658
+ */
659
+
660
+ optgroup {
661
+ font-weight: bold;
662
+ }
663
+ }
664
+
665
+ @if _normalize-include(tables) {
666
+ /* Tables
667
+ ========================================================================== */
668
+
669
+ /**
670
+ * Remove most spacing between table cells.
671
+ */
672
+
673
+ table {
674
+ border-collapse: collapse;
675
+ border-spacing: 0;
676
+ }
677
+
678
+ td,
679
+ th {
680
+ padding: 0;
681
+ }
682
+ }
683
+ }