locomotivecms_wagon 2.4.0.rc2 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) hide show
  1. checksums.yaml +4 -4
  2. data/generators/foundation/public/javascripts/vendor/foundation.js +10839 -6523
  3. data/generators/foundation/public/javascripts/vendor/foundation.min.js +5 -3
  4. data/generators/foundation/public/stylesheets/_settings.scss +455 -115
  5. data/generators/foundation/public/stylesheets/app.css +0 -3
  6. data/generators/foundation/public/stylesheets/app.scss +15 -6
  7. data/generators/foundation/public/stylesheets/foundation.css +4191 -1885
  8. data/generators/foundation/public/stylesheets/foundation6/_global.scss +106 -54
  9. data/generators/foundation/public/stylesheets/foundation6/components/_accordion-menu.scss +157 -14
  10. data/generators/foundation/public/stylesheets/foundation6/components/_accordion.scss +71 -28
  11. data/generators/foundation/public/stylesheets/foundation6/components/_badge.scss +17 -9
  12. data/generators/foundation/public/stylesheets/foundation6/components/_breadcrumbs.scss +33 -10
  13. data/generators/foundation/public/stylesheets/foundation6/components/_button-group.scss +168 -30
  14. data/generators/foundation/public/stylesheets/foundation6/components/_button.scss +165 -44
  15. data/generators/foundation/public/stylesheets/foundation6/components/_callout.scss +9 -18
  16. data/generators/foundation/public/stylesheets/foundation6/components/_card.scss +129 -0
  17. data/generators/foundation/public/stylesheets/foundation6/components/_close-button.scss +54 -13
  18. data/generators/foundation/public/stylesheets/foundation6/components/_drilldown.scss +108 -33
  19. data/generators/foundation/public/stylesheets/foundation6/components/_dropdown-menu.scss +215 -64
  20. data/generators/foundation/public/stylesheets/foundation6/components/_dropdown.scss +22 -7
  21. data/generators/foundation/public/stylesheets/foundation6/components/_flex-video.scss +1 -68
  22. data/generators/foundation/public/stylesheets/foundation6/components/_flex.scss +117 -0
  23. data/generators/foundation/public/stylesheets/foundation6/components/_float.scss +1 -1
  24. data/generators/foundation/public/stylesheets/foundation6/components/_label.scss +16 -8
  25. data/generators/foundation/public/stylesheets/foundation6/components/_media-object.scss +50 -10
  26. data/generators/foundation/public/stylesheets/foundation6/components/_menu-icon.scss +9 -0
  27. data/generators/foundation/public/stylesheets/foundation6/components/_menu.scss +373 -91
  28. data/generators/foundation/public/stylesheets/foundation6/components/_off-canvas.scss +418 -83
  29. data/generators/foundation/public/stylesheets/foundation6/components/_orbit.scss +17 -7
  30. data/generators/foundation/public/stylesheets/foundation6/components/_pagination.scss +77 -45
  31. data/generators/foundation/public/stylesheets/foundation6/components/_progress-bar.scss +16 -35
  32. data/generators/foundation/public/stylesheets/foundation6/components/_responsive-embed.scss +70 -0
  33. data/generators/foundation/public/stylesheets/foundation6/components/_reveal.scss +59 -34
  34. data/generators/foundation/public/stylesheets/foundation6/components/_slider.scss +17 -38
  35. data/generators/foundation/public/stylesheets/foundation6/components/_sticky.scss +5 -4
  36. data/generators/foundation/public/stylesheets/foundation6/components/_switch.scss +52 -36
  37. data/generators/foundation/public/stylesheets/foundation6/components/_table.scss +197 -79
  38. data/generators/foundation/public/stylesheets/foundation6/components/_tabs.scss +126 -67
  39. data/generators/foundation/public/stylesheets/foundation6/components/_thumbnail.scss +17 -4
  40. data/generators/foundation/public/stylesheets/foundation6/components/_title-bar.scss +61 -21
  41. data/generators/foundation/public/stylesheets/foundation6/components/_tooltip.scss +74 -24
  42. data/generators/foundation/public/stylesheets/foundation6/components/_top-bar.scss +128 -10
  43. data/generators/foundation/public/stylesheets/foundation6/components/_visibility.scss +6 -5
  44. data/generators/foundation/public/stylesheets/foundation6/forms/_checkbox.scss +14 -9
  45. data/generators/foundation/public/stylesheets/foundation6/forms/_error.scss +12 -5
  46. data/generators/foundation/public/stylesheets/foundation6/forms/_fieldset.scss +6 -6
  47. data/generators/foundation/public/stylesheets/foundation6/forms/_forms.scss +11 -9
  48. data/generators/foundation/public/stylesheets/foundation6/forms/_help-text.scss +1 -1
  49. data/generators/foundation/public/stylesheets/foundation6/forms/_input-group.scss +82 -10
  50. data/generators/foundation/public/stylesheets/foundation6/forms/_label.scss +2 -0
  51. data/generators/foundation/public/stylesheets/foundation6/forms/_meter.scss +116 -0
  52. data/generators/foundation/public/stylesheets/foundation6/forms/_progress.scss +94 -0
  53. data/generators/foundation/public/stylesheets/foundation6/forms/_range.scss +149 -0
  54. data/generators/foundation/public/stylesheets/foundation6/forms/_select.scss +36 -14
  55. data/generators/foundation/public/stylesheets/foundation6/forms/_text.scss +53 -27
  56. data/generators/foundation/public/stylesheets/foundation6/foundation.scss +59 -17
  57. data/generators/foundation/public/stylesheets/foundation6/grid/_classes.scss +100 -56
  58. data/generators/foundation/public/stylesheets/foundation6/grid/_column.scss +22 -22
  59. data/generators/foundation/public/stylesheets/foundation6/grid/_flex-grid.scss +164 -96
  60. data/generators/foundation/public/stylesheets/foundation6/grid/_grid.scss +19 -4
  61. data/generators/foundation/public/stylesheets/foundation6/grid/_gutter.scss +61 -10
  62. data/generators/foundation/public/stylesheets/foundation6/grid/_layout.scss +49 -5
  63. data/generators/foundation/public/stylesheets/foundation6/grid/_position.scss +14 -9
  64. data/generators/foundation/public/stylesheets/foundation6/grid/_row.scss +42 -15
  65. data/generators/foundation/public/stylesheets/foundation6/motion-ui/_classes.scss +11 -4
  66. data/generators/foundation/public/stylesheets/foundation6/motion-ui/effects/_fade.scss +4 -1
  67. data/generators/foundation/public/stylesheets/foundation6/motion-ui/effects/_zoom.scss +1 -1
  68. data/generators/foundation/public/stylesheets/foundation6/motion-ui/transitions/_slide.scss +1 -1
  69. data/generators/foundation/public/stylesheets/foundation6/motion-ui/util/_transition.scss +1 -1
  70. data/generators/foundation/public/stylesheets/foundation6/prototype/_arrow.scss +36 -0
  71. data/generators/foundation/public/stylesheets/foundation6/prototype/_border-box.scss +35 -0
  72. data/generators/foundation/public/stylesheets/foundation6/prototype/_border-none.scss +35 -0
  73. data/generators/foundation/public/stylesheets/foundation6/prototype/_bordered.scss +54 -0
  74. data/generators/foundation/public/stylesheets/foundation6/prototype/_box.scss +23 -0
  75. data/generators/foundation/public/stylesheets/foundation6/prototype/_display.scss +50 -0
  76. data/generators/foundation/public/stylesheets/foundation6/prototype/_font-styling.scss +95 -0
  77. data/generators/foundation/public/stylesheets/foundation6/prototype/_list-style-type.scss +95 -0
  78. data/generators/foundation/public/stylesheets/foundation6/prototype/_overflow.scss +72 -0
  79. data/generators/foundation/public/stylesheets/foundation6/prototype/_position.scss +114 -0
  80. data/generators/foundation/public/stylesheets/foundation6/prototype/_prototype.scss +87 -0
  81. data/generators/foundation/public/stylesheets/foundation6/prototype/_relation.scss +157 -0
  82. data/generators/foundation/public/stylesheets/foundation6/prototype/_rotate.scss +31 -0
  83. data/generators/foundation/public/stylesheets/foundation6/prototype/_rounded.scss +54 -0
  84. data/generators/foundation/public/stylesheets/foundation6/prototype/_separator.scss +96 -0
  85. data/generators/foundation/public/stylesheets/foundation6/prototype/_shadow.scss +43 -0
  86. data/generators/foundation/public/stylesheets/foundation6/prototype/_sizing.scss +73 -0
  87. data/generators/foundation/public/stylesheets/foundation6/prototype/_spacing.scss +204 -0
  88. data/generators/foundation/public/stylesheets/foundation6/prototype/_text-decoration.scss +48 -0
  89. data/generators/foundation/public/stylesheets/foundation6/prototype/_text-transformation.scss +48 -0
  90. data/generators/foundation/public/stylesheets/foundation6/prototype/_text-utilities.scss +88 -0
  91. data/generators/foundation/public/stylesheets/foundation6/settings/_settings.scss +454 -116
  92. data/generators/foundation/public/stylesheets/foundation6/typography/_alignment.scss +9 -8
  93. data/generators/foundation/public/stylesheets/foundation6/typography/_base.scss +128 -55
  94. data/generators/foundation/public/stylesheets/foundation6/typography/_helpers.scss +7 -4
  95. data/generators/foundation/public/stylesheets/foundation6/typography/_print.scss +22 -9
  96. data/generators/foundation/public/stylesheets/foundation6/typography/_typography.scss +0 -2
  97. data/generators/foundation/public/stylesheets/foundation6/util/_breakpoint.scss +213 -47
  98. data/generators/foundation/public/stylesheets/foundation6/util/_color.scss +105 -17
  99. data/generators/foundation/public/stylesheets/foundation6/util/_direction.scss +31 -0
  100. data/generators/foundation/public/stylesheets/foundation6/util/_flex.scss +85 -0
  101. data/generators/foundation/public/stylesheets/foundation6/util/_math.scss +72 -0
  102. data/generators/foundation/public/stylesheets/foundation6/util/_mixins.scss +161 -38
  103. data/generators/foundation/public/stylesheets/foundation6/util/_selector.scss +5 -3
  104. data/generators/foundation/public/stylesheets/foundation6/util/_typography.scss +26 -0
  105. data/generators/foundation/public/stylesheets/foundation6/util/_unit.scss +100 -17
  106. data/generators/foundation/public/stylesheets/foundation6/util/_util.scss +4 -5
  107. data/generators/foundation/public/stylesheets/foundation6/util/_value.scss +68 -25
  108. data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/_normalize.scss +3 -0
  109. data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/normalize/_import-now.scss +11 -0
  110. data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/normalize/_normalize-mixin.scss +676 -0
  111. data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/normalize/_variables.scss +36 -0
  112. data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/normalize/_vertical-rhythm.scss +61 -0
  113. data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_contain.scss +31 -0
  114. data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_purge.scss +38 -0
  115. data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_remove.scss +31 -0
  116. data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_replace.scss +46 -0
  117. data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_to-list.scss +27 -0
  118. data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/helpers/_missing-dependencies.scss +25 -0
  119. data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/helpers/_true.scss +13 -0
  120. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_cell.scss +169 -0
  121. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_classes.scss +476 -0
  122. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_collapse.scss +74 -0
  123. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_frame.scss +85 -0
  124. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_grid.scss +35 -0
  125. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_gutters.scss +45 -0
  126. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_layout.scss +33 -0
  127. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_position.scss +28 -0
  128. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_xy-grid.scss +51 -0
  129. data/lib/locomotive/wagon/tools/styled_yaml.rb +1 -1
  130. data/lib/locomotive/wagon/version.rb +1 -1
  131. data/locomotivecms_wagon.gemspec +2 -2
  132. data/spec/fixtures/cassettes/authenticate.yml +102 -48
  133. data/spec/fixtures/cassettes/delete.yml +519 -259
  134. data/spec/fixtures/cassettes/push.yml +2724 -1486
  135. metadata +61 -10
  136. data/generators/foundation/public/stylesheets/foundation6/motion-ui.scss +0 -4
  137. data/generators/foundation/public/stylesheets/foundation6/vendor/normalize.scss +0 -424
@@ -3,18 +3,19 @@
3
3
  // Licensed under MIT Open Source
4
4
 
5
5
  @mixin foundation-text-alignment {
6
- @each $align in (left, right, center, justify) {
7
- .text-#{$align} {
8
- text-align: $align;
9
- }
10
-
11
- @each $size in $breakpoint-classes {
12
- @include breakpoint($size) {
13
- @if $size != 'small' {
6
+ @each $size in $breakpoint-classes {
7
+ @include breakpoint($size) {
8
+ @each $align in (left, right, center, justify) {
9
+ @if $size != $-zf-zero-breakpoint {
14
10
  .#{$size}-text-#{$align} {
15
11
  text-align: $align;
16
12
  }
17
13
  }
14
+ @else {
15
+ .text-#{$align} {
16
+ text-align: $align;
17
+ }
18
+ }
18
19
  }
19
20
  }
20
21
  }
@@ -12,7 +12,7 @@
12
12
  // - Paragraphs <p>
13
13
  // - Bold/italics <b> <strong> <i> <em>
14
14
  // - Small text <small>
15
- // - Headings <h1>—<h6>
15
+ // - Headings <h1>-<h6>
16
16
  // - Anchors <a>
17
17
  // - Dividers <hr>
18
18
  // - Lists <ul> <ol> <dl>
@@ -36,28 +36,7 @@ $header-font-style: normal !default;
36
36
 
37
37
  /// Font stack used for elements that use monospaced type, such as code samples
38
38
  /// @type String | List
39
- $font-family-monospace: Consolas, "Liberation Mono", Courier, monospace !default;
40
-
41
- /// Sizes of headings at various screen sizes. Each key is a breakpoint, and each value is a map of heading sizes.
42
- /// @type Map
43
- $header-sizes: (
44
- small: (
45
- 'h1': 24,
46
- 'h2': 20,
47
- 'h3': 19,
48
- 'h4': 18,
49
- 'h5': 17,
50
- 'h6': 16,
51
- ),
52
- medium: (
53
- 'h1': 48,
54
- 'h2': 40,
55
- 'h3': 31,
56
- 'h4': 25,
57
- 'h5': 20,
58
- 'h6': 16,
59
- ),
60
- ) !default;
39
+ $font-family-monospace: Consolas, 'Liberation Mono', Courier, monospace !default;
61
40
 
62
41
  /// Color of headers.
63
42
  /// @type Color
@@ -71,6 +50,47 @@ $header-lineheight: 1.4 !default;
71
50
  /// @type Number
72
51
  $header-margin-bottom: 0.5rem !default;
73
52
 
53
+ /// Styles for headings at various screen sizes. Each key is a breakpoint, and each value is a map of heading styles.
54
+ /// @type Map
55
+ $header-styles: (
56
+ small: (
57
+ 'h1': ('font-size': 24),
58
+ 'h2': ('font-size': 20),
59
+ 'h3': ('font-size': 19),
60
+ 'h4': ('font-size': 18),
61
+ 'h5': ('font-size': 17),
62
+ 'h6': ('font-size': 16),
63
+ ),
64
+ medium: (
65
+ 'h1': ('font-size': 48),
66
+ 'h2': ('font-size': 40),
67
+ 'h3': ('font-size': 31),
68
+ 'h4': ('font-size': 25),
69
+ 'h5': ('font-size': 20),
70
+ 'h6': ('font-size': 16),
71
+ ),
72
+ ) !default;
73
+
74
+ // $header-styles map is built from $header-sizes in order to ensure downward compatibility
75
+ // when $header-sizes is depreciated, $header-styles needs to get !default values like settings.scss
76
+ @function build_from_header-sizes($header-sizes) {
77
+ @warn 'Note, that $header-sizes has been replaced with $header-styles. $header-sizes still works, but it is going to be depreciated.';
78
+ $header-styles: ();
79
+ @each $size, $headers in $header-sizes {
80
+ $header-map: ();
81
+ @each $header, $font-size in $headers {
82
+ $header-map: map-merge($header-map, ($header: ('font-size': $font-size)));
83
+ }
84
+ $header-styles: map-merge($header-styles, ($size: $header-map));
85
+ }
86
+ @return $header-styles;
87
+ }
88
+
89
+ // If it exists $headers-sizes is used to build $header-styles. See the documentation.
90
+ @if variable-exists(header-sizes) {
91
+ $header-styles: build_from_header-sizes($header-sizes);
92
+ }
93
+
74
94
  /// Text rendering method of headers.
75
95
  /// @type String
76
96
  $header-text-rendering: optimizeLegibility !default;
@@ -127,7 +147,7 @@ $anchor-color: $primary-color !default;
127
147
  /// @type Color
128
148
  $anchor-color-hover: scale-color($anchor-color, $lightness: -14%) !default;
129
149
 
130
- /// Default text deocration for links.
150
+ /// Default text decoration for links.
131
151
  /// @type String
132
152
  $anchor-text-decoration: none !default;
133
153
 
@@ -203,6 +223,10 @@ $cite-font-size: rem-calc(13) !default;
203
223
  /// @type Color
204
224
  $cite-color: $dark-gray !default;
205
225
 
226
+ /// Pseudo content for `<cite>` elements.
227
+ /// @type String
228
+ $cite-pseudo-content: '\2014 \0020' !default;
229
+
206
230
  /// Font family for `<kbd>` elements.
207
231
  /// @type String | List
208
232
  $keystroke-font: $font-family-monospace !default;
@@ -254,9 +278,10 @@ $abbr-underline: 1px dotted $black !default;
254
278
 
255
279
  // Paragraphs
256
280
  p {
281
+ margin-bottom: $paragraph-margin-bottom;
282
+
257
283
  font-size: inherit;
258
284
  line-height: $paragraph-lineheight;
259
- margin-bottom: $paragraph-margin-bottom;
260
285
  text-rendering: $paragraph-text-rendering;
261
286
  }
262
287
 
@@ -281,41 +306,73 @@ $abbr-underline: 1px dotted $black !default;
281
306
  }
282
307
 
283
308
  // Headings
284
- h1,
285
- h2,
286
- h3,
287
- h4,
288
- h5,
289
- h6 {
309
+ h1, .h1,
310
+ h2, .h2,
311
+ h3, .h3,
312
+ h4, .h4,
313
+ h5, .h5,
314
+ h6, .h6 {
290
315
  font-family: $header-font-family;
291
- font-weight: $header-font-weight;
292
316
  font-style: $header-font-style;
317
+ font-weight: $header-font-weight;
293
318
  color: $header-color;
294
319
  text-rendering: $header-text-rendering;
295
- margin-top: 0;
296
- margin-bottom: $header-margin-bottom;
297
- line-height: $header-lineheight;
298
320
 
299
321
  small {
300
- color: $header-small-font-color;
301
322
  line-height: 0;
323
+ color: $header-small-font-color;
302
324
  }
303
325
  }
304
326
 
305
- // Heading sizes
306
- @each $size, $headers in $header-sizes {
327
+ // Heading styles
328
+ @each $size, $headers in $header-styles {
307
329
  @include breakpoint($size) {
308
- @each $header, $font-size in $headers {
309
- #{$header} { font-size: rem-calc($font-size); }
330
+ @each $header, $header-defs in $headers {
331
+ $font-size-temp: 1rem;
332
+ #{$header}, .#{$header} {
333
+
334
+ @if map-has-key($header-defs, font-size) {
335
+ $font-size-temp: rem-calc(map-get($header-defs, font-size));
336
+ font-size: $font-size-temp;
337
+ } @else if map-has-key($header-defs, fs) {
338
+ $font-size-temp: rem-calc(map-get($header-defs, fs));
339
+ font-size: $font-size-temp;
340
+ } @else if $size == $-zf-zero-breakpoint {
341
+ font-size: $font-size-temp;
342
+ }
343
+ @if map-has-key($header-defs, line-height) {
344
+ line-height: unitless-calc(map-get($header-defs, line-height), $font-size-temp);
345
+ } @else if map-has-key($header-defs, lh) {
346
+ line-height: unitless-calc(map-get($header-defs, lh), $font-size-temp);
347
+ } @else if $size == $-zf-zero-breakpoint {
348
+ line-height: unitless-calc($header-lineheight, $font-size-temp);
349
+ }
350
+
351
+ @if map-has-key($header-defs, margin-top) {
352
+ margin-top: rem-calc(map-get($header-defs, margin-top));
353
+ } @else if map-has-key($header-defs, mt) {
354
+ margin-top: rem-calc(map-get($header-defs, mt));
355
+ } @else if $size == $-zf-zero-breakpoint {
356
+ margin-top: 0;
357
+ }
358
+ @if map-has-key($header-defs, margin-bottom) {
359
+ margin-bottom: rem-calc(map-get($header-defs, margin-bottom));
360
+ } @else if map-has-key($header-defs, mb) {
361
+ margin-bottom: rem-calc(map-get($header-defs, mb));
362
+ } @else if $size == $-zf-zero-breakpoint {
363
+ margin-bottom: rem-calc($header-margin-bottom);
364
+ }
365
+ }
310
366
  }
311
367
  }
312
368
  }
313
369
 
314
370
  // Links
315
371
  a {
372
+ line-height: inherit;
316
373
  color: $anchor-color;
317
374
  text-decoration: $anchor-text-decoration;
318
- line-height: inherit;
375
+
319
376
  cursor: pointer;
320
377
 
321
378
  &:hover,
@@ -333,21 +390,25 @@ $abbr-underline: 1px dotted $black !default;
333
390
 
334
391
  // Horizontal rule
335
392
  hr {
393
+ clear: both;
394
+
336
395
  max-width: $hr-width;
337
396
  height: 0;
397
+ margin: $hr-margin;
398
+
338
399
  border-top: 0;
400
+ border-right: 0;
339
401
  border-bottom: $hr-border;
340
- margin: $hr-margin;
341
- clear: both;
402
+ border-left: 0;
342
403
  }
343
404
 
344
405
  // Lists
345
406
  ul,
346
407
  ol,
347
408
  dl {
348
- line-height: $list-lineheight;
349
409
  margin-bottom: $list-margin-bottom;
350
410
  list-style-position: $list-style-position;
411
+ line-height: $list-lineheight;
351
412
  }
352
413
 
353
414
  // List items
@@ -357,8 +418,8 @@ $abbr-underline: 1px dotted $black !default;
357
418
 
358
419
  // Unordered lists
359
420
  ul {
360
- list-style-type: $list-style-type;
361
421
  margin-#{$global-left}: $list-side-margin;
422
+ list-style-type: $list-style-type;
362
423
  }
363
424
 
364
425
  // Ordered lists
@@ -371,7 +432,6 @@ $abbr-underline: 1px dotted $black !default;
371
432
  & & {
372
433
  margin-#{$global-left}: $list-nested-side-margin;
373
434
  margin-bottom: 0;
374
- list-style-type: inherit;
375
435
  }
376
436
  }
377
437
 
@@ -404,33 +464,46 @@ $abbr-underline: 1px dotted $black !default;
404
464
  color: $cite-color;
405
465
 
406
466
  &:before {
407
- content: '\2014 \0020';
467
+ content: $cite-pseudo-content;
408
468
  }
409
469
  }
410
470
 
411
471
  // Abbreviations
412
- abbr {
413
- color: $body-font-color;
414
- cursor: help;
472
+ abbr, abbr[title] {
415
473
  border-bottom: $abbr-underline;
474
+ cursor: help;
475
+ text-decoration: none;
416
476
  }
417
477
 
478
+ // Figures
479
+ figure {
480
+ margin: 0;
481
+ }
482
+
418
483
  // Code
419
484
  code {
485
+ padding: $code-padding;
486
+
487
+ border: $code-border;
488
+ background-color: $code-background;
489
+
420
490
  font-family: $code-font-family;
421
491
  font-weight: $code-font-weight;
422
492
  color: $code-color;
423
- background-color: $code-background;
424
- border: $code-border;
425
- padding: $code-padding;
426
493
  }
427
494
 
428
495
  // Keystrokes
429
496
  kbd {
430
- padding: $keystroke-padding;
431
497
  margin: 0;
498
+ padding: $keystroke-padding;
499
+
432
500
  background-color: $keystroke-background;
433
- color: $keystroke-color;
501
+
434
502
  font-family: $keystroke-font;
503
+ color: $keystroke-color;
504
+
505
+ @if has-value($keystroke-radius) {
506
+ border-radius: $keystroke-radius;
507
+ }
435
508
  }
436
509
  }
@@ -48,6 +48,7 @@ $stat-font-size: 2.5rem !default;
48
48
  .subheader {
49
49
  margin-top: $subheader-margin-top;
50
50
  margin-bottom: $subheader-margin-bottom;
51
+
51
52
  font-weight: $subheader-font-weight;
52
53
  line-height: $subheader-lineheight;
53
54
  color: $subheader-color;
@@ -69,9 +70,11 @@ $stat-font-size: 2.5rem !default;
69
70
  }
70
71
  }
71
72
 
72
- // Use to remove the bullets from an unordered list
73
- .no-bullet {
74
- margin-#{$global-left}: 0;
75
- list-style: none;
73
+ ul, ol {
74
+ // Use to remove numbers from ordered list & bullets from unordered list
75
+ &.no-bullet {
76
+ margin-#{$global-left}: 0;
77
+ list-style: none;
78
+ }
76
79
  }
77
80
  }
@@ -2,20 +2,26 @@
2
2
  // foundation.zurb.com
3
3
  // Licensed under MIT Open Source
4
4
 
5
- ////
6
- /// @group typography
7
- ////
5
+ /// If `true`, all elements will have transparent backgrounds when printed, to save on ink.
6
+ /// @type Boolean
7
+ /// @group global
8
+ $print-transparent-backgrounds: true !default;
9
+ $print-hrefs: true !default;
8
10
 
9
- // scss-lint:disable all
11
+ // sass-lint:disable-all
10
12
 
11
13
  @mixin foundation-print-styles {
12
14
  .show-for-print { display: none !important; }
13
15
 
14
16
  @media print {
15
17
  * {
16
- background: transparent !important;
17
- color: black !important; // Black prints faster: h5bp.com/s
18
+ @if $print-transparent-backgrounds {
19
+ background: transparent !important;
20
+ }
21
+
18
22
  box-shadow: none !important;
23
+
24
+ color: black !important; // Black prints faster: h5bp.com/s
19
25
  text-shadow: none !important;
20
26
  }
21
27
 
@@ -32,7 +38,9 @@
32
38
  // Display the URL of a link after the text
33
39
  a,
34
40
  a:visited { text-decoration: underline;}
35
- a[href]:after { content: " (" attr(href) ")"; }
41
+ @if $print-hrefs {
42
+ a[href]:after { content: ' (' attr(href) ')'; }
43
+ }
36
44
 
37
45
  // Don't display the URL for images or JavaScript/internal links
38
46
  .ir a:after,
@@ -40,12 +48,12 @@
40
48
  a[href^='#']:after { content: ''; }
41
49
 
42
50
  // Display what an abbreviation stands for after the text
43
- abbr[title]:after { content: " (" attr(title) ")"; }
51
+ abbr[title]:after { content: ' (' attr(title) ')'; }
44
52
 
45
53
  // Prevent page breaks in the middle of a blockquote or preformatted text block
46
54
  pre,
47
55
  blockquote {
48
- border: 1px solid #999;
56
+ border: 1px solid $dark-gray;
49
57
  page-break-inside: avoid;
50
58
  }
51
59
 
@@ -69,5 +77,10 @@
69
77
  // Avoid page breaks after a heading
70
78
  h2,
71
79
  h3 { page-break-after: avoid; }
80
+
81
+ // Helper to re-allow page breaks in the middle of certain elements (e.g. pre, blockquote, tr)
82
+ .print-break-inside {
83
+ page-break-inside: auto;
84
+ }
72
85
  }
73
86
  }
@@ -6,8 +6,6 @@
6
6
  /// @group typography
7
7
  ////
8
8
 
9
- // scss-lint:disable DeclarationOrder
10
-
11
9
  // Base typography styles (tags only)
12
10
  @import 'base';
13
11
 
@@ -6,8 +6,6 @@
6
6
  /// @group breakpoints
7
7
  ////
8
8
 
9
- // scss-lint:disable ZeroUnit
10
-
11
9
  /// A list of named breakpoints. You can use these with the `breakpoint()` mixin to quickly create media queries.
12
10
  /// @type Map
13
11
  $breakpoints: (
@@ -18,13 +16,29 @@ $breakpoints: (
18
16
  xxlarge: 1440px,
19
17
  ) !default;
20
18
 
19
+ /// The largest named breakpoint in which to include print as a media type
20
+ /// @type Keyword
21
+ $print-breakpoint: large !default;
22
+
23
+ $-zf-zero-breakpoint: small !default;
24
+
25
+ $-zf-breakpoints-keys: map-to-list($breakpoints, 'keys');
26
+
27
+ @if nth(map-values($breakpoints), 1) != 0 {
28
+ @error 'Your smallest breakpoint (defined in $breakpoints) must be set to "0".';
29
+ }
30
+ @else {
31
+ $-zf-zero-breakpoint: nth(map-keys($breakpoints), 1);
32
+ }
33
+
21
34
  /// All of the names in this list will be output as classes in your CSS, like `.small-12`, `.medium-6`, and so on. Each value in this list must also be in the `$breakpoints` map.
22
35
  /// @type List
23
36
  $breakpoint-classes: (small medium large) !default;
24
37
 
25
38
  /// Generates a media query string matching the input value. Refer to the documentation for the `breakpoint()` mixin to see what the possible inputs are.
26
- /// @param {Keyword|Number} $val - Breakpoint name, or px, rem, or em value to process.
27
- @function breakpoint($val: small) {
39
+ ///
40
+ /// @param {Keyword|Number} $val [small] - Breakpoint name, or px, rem, or em value to process.
41
+ @function breakpoint($val: $-zf-zero-breakpoint) {
28
42
  // Size or keyword
29
43
  $bp: nth($val, 1);
30
44
  // Value for max-width media queries
@@ -48,14 +62,7 @@ $breakpoint-classes: (small medium large) !default;
48
62
  @if type-of($bp) == 'string' {
49
63
  @if map-has-key($breakpoints, $bp) {
50
64
  @if $dir == 'only' or $dir == 'down' {
51
- $next-bp: -zf-map-next($breakpoints, $bp);
52
-
53
- @if $next-bp == null {
54
- $bp-max: null;
55
- }
56
- @else {
57
- $bp-max: $next-bp;
58
- }
65
+ $bp-max: -zf-map-next($breakpoints, $bp);
59
66
  }
60
67
 
61
68
  $bp: map-get($breakpoints, $bp);
@@ -63,6 +70,7 @@ $breakpoint-classes: (small medium large) !default;
63
70
  }
64
71
  @else {
65
72
  $bp: 0;
73
+ @warn 'breakpoint(): "#{$val}" is not defined in your $breakpoints setting.';
66
74
  }
67
75
  }
68
76
 
@@ -72,39 +80,49 @@ $breakpoint-classes: (small medium large) !default;
72
80
  $bp-max: -zf-bp-to-em($bp-max) - (1/16);
73
81
  }
74
82
 
75
- // Skip media query creation if the input is "0 up" or "0 down"
76
- @if $bp > 0 or $dir == 'only' {
77
- // "Only" ranges use the format "(min-width: n) and (max-width: n)"
83
+ // Conditions to skip media query creation
84
+ // - It's a named breakpoint that resolved to "0 down" or "0 up"
85
+ // - It's a numeric breakpoint that resolved to "0 " + anything
86
+ @if $bp > 0em or $dir == 'only' or $dir == 'down' {
87
+ // `only` ranges use the format `(min-width: n) and (max-width: n)`
78
88
  @if $dir == 'only' {
89
+ // Only named media queries can have an "only" range
79
90
  @if $named == true {
80
- $str: $str + '(min-width: #{$bp})';
91
+ // Only use "min-width" if the floor is greater than 0
92
+ @if $bp > 0em {
93
+ $str: $str + '(min-width: #{$bp})';
81
94
 
95
+ // Only add "and" to the media query if there's a ceiling
96
+ @if $bp-max != null {
97
+ $str: $str + ' and ';
98
+ }
99
+ }
100
+
101
+ // Only use "max-width" if there's a ceiling
82
102
  @if $bp-max != null {
83
- $str: $str + ' and (max-width: #{$bp-max})';
103
+ $str: $str + '(max-width: #{$bp-max})';
84
104
  }
85
105
  }
86
106
  @else {
87
- @warn 'Only named media queries can have an "only" range.';
107
+ @warn 'breakpoint(): Only named media queries can have an `only` range.';
88
108
  }
89
109
  }
90
110
 
91
- // "Down" ranges use the format "(max-width: n)"
111
+ // `down` ranges use the format `(max-width: n)`
92
112
  @else if $dir == 'down' {
93
- $max: 0;
113
+ $max: if($named, $bp-max, $bp);
94
114
 
95
- // For named breakpoints, subtract the breakpoint value by one "pixel", or 1/16em.
96
- @if $named {
97
- $max: $bp-max;
98
- }
99
- @else {
100
- $max: $bp;
115
+ // Skip media query creation if input value is exactly "0 down",
116
+ // unless the function was called as "small down", in which case it's just "small only"
117
+ @if $named or $bp > 0em {
118
+ @if $max != null {
119
+ $str: $str + '(max-width: #{$max})';
120
+ }
101
121
  }
102
-
103
- $str: $str + '(max-width: #{$max})';
104
122
  }
105
123
 
106
- // "Up" ranges use the format "(min-width: n)"
107
- @else if strip-unit($bp) > 0 {
124
+ // `up` ranges use the format `(min-width: n)`
125
+ @else if $bp > 0em {
108
126
  $str: $str + '(min-width: #{$bp})';
109
127
  }
110
128
  }
@@ -114,14 +132,25 @@ $breakpoint-classes: (small medium large) !default;
114
132
 
115
133
  /// Wraps a media query around the content you put inside the mixin. This mixin accepts a number of values:
116
134
  /// - If a string is passed, the mixin will look for it in the `$breakpoints` map, and use a media query there.
117
- /// - If a pixel value is passed, it will be converted to an em value using `$rem-base`.
135
+ /// - If a pixel value is passed, it will be converted to an em value using `$global-font-size` as the base.
118
136
  /// - If a rem value is passed, the unit will be changed to em.
119
137
  /// - If an em value is passed, the value will be used as-is.
120
- /// @content
138
+ ///
121
139
  /// @param {Keyword|Number} $value - Breakpoint name, or px, rem, or em value to process.
140
+ ///
122
141
  /// @output If the breakpoint is "0px and larger", outputs the content as-is. Otherwise, outputs the content wrapped in a media query.
123
142
  @mixin breakpoint($value) {
124
143
  $str: breakpoint($value);
144
+ $bp: index($-zf-breakpoints-keys, $value);
145
+ $pbp: index($-zf-breakpoints-keys, $print-breakpoint);
146
+
147
+ $old-zf-size: null;
148
+
149
+ // Make breakpoint size available as a variable
150
+ @if global-variable-exists(-zf-size) {
151
+ $old-zf-size: $-zf-size;
152
+ }
153
+ $-zf-size: nth($value, 1) !global; // get the first value to account for `only` and `down` keywords
125
154
 
126
155
  // If $str is still an empty string, no media query is needed
127
156
  @if $str == '' {
@@ -130,15 +159,32 @@ $breakpoint-classes: (small medium large) !default;
130
159
 
131
160
  // Otherwise, wrap the content in a media query
132
161
  @else {
133
- @media screen and #{$str} {
134
- @content;
162
+ // For named breakpoints less than or equal to $print-breakpoint, add print to the media types
163
+ @if $bp != null and $bp <= $pbp {
164
+ @media print, screen and #{$str} {
165
+ @content;
166
+ }
135
167
  }
168
+ @else {
169
+ @media screen and #{$str} {
170
+ @content;
171
+ }
172
+ }
173
+ }
174
+
175
+ @if $old-zf-size != null {
176
+ // Restore the old breakpoint size
177
+ $-zf-size: $old-zf-size !global;
178
+ } @else {
179
+ $-zf-size: null !global;
136
180
  }
137
181
  }
138
182
 
139
183
  /// Convers the breakpoints map to a URL-encoded string, like this: `key1=value1&key2=value2`. The value is then dropped into the CSS for a special `<meta>` tag, which is read by the Foundation JavaScript. This is how we transfer values from Sass to JavaScript, so they can be defined in one place.
140
184
  /// @access private
185
+ ///
141
186
  /// @param {Map} $map - Map to convert.
187
+ ///
142
188
  /// @returns {String} A string containing the map's contents.
143
189
  @function -zf-bp-serialize($map) {
144
190
  $str: '';
@@ -152,31 +198,151 @@ $breakpoint-classes: (small medium large) !default;
152
198
 
153
199
  /// Find the next key in a map.
154
200
  /// @access private
201
+ ///
155
202
  /// @param {Map} $map - Map to traverse.
156
203
  /// @param {Mixed} $key - Key to use as a starting point.
204
+ ///
157
205
  /// @returns {Mixed} The value for the key after `$key`, if `$key` was found. If `$key` was not found, or `$key` was the last value in the map, returns `null`.
158
206
  @function -zf-map-next($map, $key) {
159
- // Store the values of the map as a list, so we can access them with nth
160
- $values: map-values($map);
161
207
 
162
- // Ghetto for loop
163
- $i: 1;
208
+ // Store the keys of the map as a list
209
+ $values: map-keys($map);
210
+
211
+ $i: 0;
212
+
213
+ // If the Key Exists, Get the index of the key within the map and add 1 to it for the next breakpoint in the map
214
+ @if (map-has-key($map, $key)) {
215
+ $i: index($values, $key) + 1;
216
+ }
217
+
218
+ // If the key doesn't exist, or it's the last key in the map, return null
219
+ @if ($i > length($map) or $i == 0) {
220
+ @return null;
221
+ }
222
+ // Otherwise, return the value
223
+ @else {
224
+ @return map-get($map, nth($values, $i));
225
+ }
226
+
227
+ }
228
+
229
+ /// Return a list of our named breakpoints less than $key. Useful for dealing with
230
+ /// responsive gutters for the grid.
231
+ /// @access private
232
+ ///
233
+ /// @param {String} $key - Key to use as last breakpoint.
234
+ ///
235
+ /// @returns {Array} The list of breakpoints up to and. If $key is auto, returns breakpoints above the zero
236
+ @function -zf-breakpoints-less-than($key) {
237
+ $list: ();
238
+ $found_key: false;
239
+
240
+ @each $name in $-zf-breakpoints-keys {
241
+ @if ($name == $key) {
242
+ $found_key: true;
243
+ }
244
+ @if not $found_key {
245
+ $list: append($list, $name);
246
+ }
247
+ }
248
+ @return $list;
249
+ }
250
+
251
+ /// Return a list of our named breakpoints less than $key. Useful for dealing with
252
+ /// responsive gutters for the grid.
253
+ /// @access private
254
+ ///
255
+ /// @param {String} $breakpoing - a named or non-named breakpoing.
256
+ ///
257
+ /// @returns {Array} The list of breakpoints up to and. If $key is auto, returns breakpoints above the zero
258
+ @function -zf-closest-named-breakpoint($breakpoint) {
259
+ $last: $-zf-zero-breakpoint;
164
260
  $found: false;
165
- @each $val in map-keys($map) {
166
- @if $found == false {
167
- @if ($key == $val) {
261
+
262
+ $value: unitless-calc($breakpoint, 1px);
263
+ @each $key, $val in $breakpoints {
264
+ @if not $found {
265
+ @if unitless-calc($val) > $value {
168
266
  $found: true;
267
+ } @else {
268
+ $last: $key;
169
269
  }
170
- $i: $i + 1;
171
270
  }
172
271
  }
173
272
 
174
- // If the key doesn't exist, or it's the last key in the map, return null
175
- @if $i > length($map) {
176
- @return null;
273
+ @return $last;
274
+ }
275
+
276
+ /// Get a value for a breakpoint from a responsive config map or single value.
277
+ /// - If the config is a single value, return it regardless of `$value`.
278
+ /// - If the config is a map and has the key `$value`, the exact breakpoint value is returned.
279
+ /// - If the config is a map and does *not* have the breakpoint, the value matching the next lowest breakpoint in the config map is returned.
280
+ /// @access private
281
+ ///
282
+ /// @param {Number|Map} $map - Responsive config map or single value.
283
+ /// @param {Keyword} $value - Breakpoint name to use.
284
+ ///
285
+ /// @return {Mixed} The corresponding breakpoint value.
286
+ @function -zf-get-bp-val($map, $value) {
287
+ // If the given map is a single value, return it
288
+ @if type-of($map) == 'number' {
289
+ @return $map;
177
290
  }
178
- // Otherwise, return the value
291
+
292
+
293
+ // Check if the breakpoint name exists globally
294
+ @if not map-has-key($breakpoints, $value) {
295
+ @if type-of($value) == 'number' {
296
+ $value: -zf-closest-named-breakpoint($value);
297
+ } @else {
298
+ @return null;
299
+ }
300
+ }
301
+ // Check if the breakpoint name exists in the local config map
302
+ @else if map-has-key($map, $value) {
303
+ // If it does, just return the value
304
+ @return map-get($map, $value);
305
+ }
306
+ // Otherwise, find the next lowest breakpoint and return that value
179
307
  @else {
180
- @return nth($values, $i);
308
+ $anchor: null;
309
+ $found: false;
310
+
311
+ @each $key, $val in $breakpoints {
312
+ @if not $found {
313
+ @if map-has-key($map, $key) {
314
+ $anchor: $key;
315
+ }
316
+ @if $key == $value {
317
+ $found: true;
318
+ }
319
+ }
320
+ }
321
+
322
+ @return map-get($map, $anchor);
181
323
  }
182
324
  }
325
+
326
+ @if map-has-key($breakpoints, small) {
327
+ $small-up: screen;
328
+ $small-only: unquote('screen and #{breakpoint(small only)}');
329
+ }
330
+
331
+ @if map-has-key($breakpoints, medium) {
332
+ $medium-up: unquote('screen and #{breakpoint(medium)}');
333
+ $medium-only: unquote('screen and #{breakpoint(medium only)}');
334
+ }
335
+
336
+ @if map-has-key($breakpoints, large) {
337
+ $large-up: unquote('screen and #{breakpoint(large)}');
338
+ $large-only: unquote('screen and #{breakpoint(large only)}');
339
+ }
340
+
341
+ @if map-has-key($breakpoints, xlarge) {
342
+ $xlarge-up: unquote('screen and #{breakpoint(xlarge)}');
343
+ $xlarge-only: unquote('screen and #{breakpoint(xlarge only)}');
344
+ }
345
+
346
+ @if map-has-key($breakpoints, xxlarge) {
347
+ $xxlarge-up: unquote('screen and #{breakpoint(xxlarge)}');
348
+ }