foundation-rails 6.1.2.0 → 6.2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +7 -6
  3. data/README.md +1 -1
  4. data/Rakefile +5 -1
  5. data/bower.json +3 -3
  6. data/foundation-rails.gemspec +1 -0
  7. data/lib/foundation-rails.rb +1 -0
  8. data/lib/foundation/rails/version.rb +1 -1
  9. data/lib/generators/foundation/templates/foundation_and_overrides.scss +2 -2
  10. data/vendor/assets/js/foundation.abide.js.es6 +462 -0
  11. data/vendor/assets/js/{foundation.accordion.js → foundation.accordion.js.es6} +55 -47
  12. data/vendor/assets/js/{foundation.accordionMenu.js → foundation.accordionMenu.js.es6} +46 -35
  13. data/vendor/assets/js/{foundation.core.js → foundation.core.js.es6} +10 -8
  14. data/vendor/assets/js/{foundation.drilldown.js → foundation.drilldown.js.es6} +75 -49
  15. data/vendor/assets/js/{foundation.dropdown.js → foundation.dropdown.js.es6} +100 -88
  16. data/vendor/assets/js/{foundation.dropdownMenu.js → foundation.dropdownMenu.js.es6} +134 -128
  17. data/vendor/assets/js/{foundation.equalizer.js → foundation.equalizer.js.es6} +72 -61
  18. data/vendor/assets/js/{foundation.interchange.js → foundation.interchange.js.es6} +44 -45
  19. data/vendor/assets/js/{foundation.js → foundation.js.es6} +0 -0
  20. data/vendor/assets/js/{foundation.magellan.js → foundation.magellan.js.es6} +80 -83
  21. data/vendor/assets/js/foundation.offcanvas.js.es6 +395 -0
  22. data/vendor/assets/js/foundation.orbit.js.es6 +445 -0
  23. data/vendor/assets/js/{foundation.responsiveMenu.js → foundation.responsiveMenu.js.es6} +37 -31
  24. data/vendor/assets/js/foundation.responsiveToggle.js.es6 +112 -0
  25. data/vendor/assets/js/foundation.reveal.js.es6 +544 -0
  26. data/vendor/assets/js/{foundation.slider.js → foundation.slider.js.es6} +235 -184
  27. data/vendor/assets/js/{foundation.sticky.js → foundation.sticky.js.es6} +177 -166
  28. data/vendor/assets/js/{foundation.tabs.js → foundation.tabs.js.es6} +138 -118
  29. data/vendor/assets/js/{foundation.toggler.js → foundation.toggler.js.es6} +34 -37
  30. data/vendor/assets/js/{foundation.tooltip.js → foundation.tooltip.js.es6} +162 -153
  31. data/vendor/assets/js/foundation.util.box.js.es6 +183 -0
  32. data/vendor/assets/js/{foundation.util.keyboard.js → foundation.util.keyboard.js.es6} +54 -54
  33. data/vendor/assets/js/{foundation.util.mediaQuery.js → foundation.util.mediaQuery.js.es6} +46 -46
  34. data/vendor/assets/js/{foundation.util.motion.js → foundation.util.motion.js.es6} +58 -48
  35. data/vendor/assets/js/foundation.util.nest.js.es6 +76 -0
  36. data/vendor/assets/js/foundation.util.timerAndImageLoader.js.es6 +86 -0
  37. data/vendor/assets/js/{foundation.util.touch.js → foundation.util.touch.js.es6} +2 -2
  38. data/vendor/assets/js/foundation.util.triggers.js.es6 +239 -0
  39. data/vendor/assets/scss/_global.scss +28 -27
  40. data/vendor/assets/scss/components/_badge.scss +1 -1
  41. data/vendor/assets/scss/components/_button-group.scss +77 -26
  42. data/vendor/assets/scss/components/_button.scss +8 -8
  43. data/vendor/assets/scss/components/_callout.scss +2 -2
  44. data/vendor/assets/scss/components/_drilldown.scss +4 -0
  45. data/vendor/assets/scss/components/_dropdown-menu.scss +104 -54
  46. data/vendor/assets/scss/components/_flex.scss +28 -0
  47. data/vendor/assets/scss/components/_label.scss +1 -1
  48. data/vendor/assets/scss/components/_media-object.scss +37 -7
  49. data/vendor/assets/scss/components/_menu-icon.scss +9 -0
  50. data/vendor/assets/scss/components/_menu.scss +127 -29
  51. data/vendor/assets/scss/components/_off-canvas.scss +1 -0
  52. data/vendor/assets/scss/components/_pagination.scss +3 -3
  53. data/vendor/assets/scss/components/_progress-bar.scss +1 -25
  54. data/vendor/assets/scss/components/_reveal.scss +12 -6
  55. data/vendor/assets/scss/components/_slider.scss +3 -35
  56. data/vendor/assets/scss/components/_table.scss +8 -0
  57. data/vendor/assets/scss/components/_tabs.scss +5 -10
  58. data/vendor/assets/scss/components/_title-bar.scss +27 -10
  59. data/vendor/assets/scss/components/_tooltip.scss +0 -4
  60. data/vendor/assets/scss/components/_top-bar.scss +93 -21
  61. data/vendor/assets/scss/components/_visibility.scss +1 -1
  62. data/vendor/assets/scss/forms/_checkbox.scss +1 -1
  63. data/vendor/assets/scss/forms/_error.scss +7 -5
  64. data/vendor/assets/scss/forms/_forms.scss +3 -0
  65. data/vendor/assets/scss/forms/_help-text.scss +1 -1
  66. data/vendor/assets/scss/forms/_input-group.scss +44 -9
  67. data/vendor/assets/scss/forms/_meter.scss +109 -0
  68. data/vendor/assets/scss/forms/_progress.scss +85 -0
  69. data/vendor/assets/scss/forms/_range.scss +144 -0
  70. data/vendor/assets/scss/forms/_select.scss +1 -1
  71. data/vendor/assets/scss/forms/_text.scss +10 -1
  72. data/vendor/assets/scss/foundation.scss +16 -5
  73. data/vendor/assets/scss/grid/_classes.scss +5 -18
  74. data/vendor/assets/scss/grid/_column.scss +13 -11
  75. data/vendor/assets/scss/grid/_flex-grid.scss +54 -80
  76. data/vendor/assets/scss/grid/_grid.scss +22 -10
  77. data/vendor/assets/scss/grid/_layout.scss +18 -0
  78. data/vendor/assets/scss/grid/_row.scss +11 -15
  79. data/vendor/assets/scss/motion-ui/_classes.scss +10 -3
  80. data/vendor/assets/scss/motion-ui/effects/_fade.scss +4 -1
  81. data/vendor/assets/scss/motion-ui/effects/_zoom.scss +1 -1
  82. data/vendor/assets/scss/motion-ui/transitions/_slide.scss +1 -1
  83. data/vendor/assets/scss/motion-ui/util/_transition.scss +1 -1
  84. data/vendor/assets/scss/settings/_settings.scss +64 -47
  85. data/vendor/assets/scss/typography/_base.scss +4 -0
  86. data/vendor/assets/scss/typography/_print.scss +9 -5
  87. data/vendor/assets/scss/util/_breakpoint.scss +31 -25
  88. data/vendor/assets/scss/util/_color.scss +19 -0
  89. data/vendor/assets/scss/util/_flex.scss +68 -0
  90. data/vendor/assets/scss/util/_mixins.scss +13 -7
  91. data/vendor/assets/scss/util/_util.scss +1 -5
  92. data/vendor/assets/scss/util/_value.scss +9 -28
  93. metadata +51 -31
  94. data/vendor/assets/js/foundation.abide.js +0 -418
  95. data/vendor/assets/js/foundation.offcanvas.js +0 -376
  96. data/vendor/assets/js/foundation.orbit.js +0 -421
  97. data/vendor/assets/js/foundation.responsiveToggle.js +0 -106
  98. data/vendor/assets/js/foundation.reveal.js +0 -514
  99. data/vendor/assets/js/foundation.util.box.js +0 -169
  100. data/vendor/assets/js/foundation.util.nest.js +0 -63
  101. data/vendor/assets/js/foundation.util.timerAndImageLoader.js +0 -82
  102. data/vendor/assets/js/foundation.util.triggers.js +0 -224
@@ -25,19 +25,20 @@
25
25
  // 20. Label
26
26
  // 21. Media Object
27
27
  // 22. Menu
28
- // 23. Off-canvas
29
- // 24. Orbit
30
- // 25. Pagination
31
- // 26. Progress Bar
32
- // 27. Reveal
33
- // 28. Slider
34
- // 29. Switch
35
- // 30. Table
36
- // 31. Tabs
37
- // 32. Thumbnail
38
- // 33. Title Bar
39
- // 34. Tooltip
40
- // 35. Top Bar
28
+ // 23. Meter
29
+ // 24. Off-canvas
30
+ // 25. Orbit
31
+ // 26. Pagination
32
+ // 27. Progress Bar
33
+ // 28. Reveal
34
+ // 29. Slider
35
+ // 30. Switch
36
+ // 31. Table
37
+ // 32. Tabs
38
+ // 33. Thumbnail
39
+ // 34. Title Bar
40
+ // 35. Tooltip
41
+ // 36. Top Bar
41
42
 
42
43
  @import 'util/util';
43
44
 
@@ -47,11 +48,13 @@
47
48
  $global-font-size: 100%;
48
49
  $global-width: rem-calc(1200);
49
50
  $global-lineheight: 1.5;
50
- $primary-color: #2199e8;
51
- $secondary-color: #777;
52
- $success-color: #3adb76;
53
- $warning-color: #ffae00;
54
- $alert-color: #ec5840;
51
+ $foundation-palette: (
52
+ primary: #2199e8,
53
+ secondary: #777,
54
+ success: #3adb76,
55
+ warning: #ffae00,
56
+ alert: #ec5840,
57
+ );
55
58
  $light-gray: #e6e6e6;
56
59
  $medium-gray: #cacaca;
57
60
  $dark-gray: #8a8a8a;
@@ -67,6 +70,10 @@ $global-weight-normal: normal;
67
70
  $global-weight-bold: bold;
68
71
  $global-radius: 0;
69
72
  $global-text-direction: ltr;
73
+ $global-flexbox: false;
74
+ $print-transparent-backgrounds: true;
75
+
76
+ @include add-foundation-colors;
70
77
 
71
78
  // 2. Breakpoints
72
79
  // --------------
@@ -85,7 +92,7 @@ $breakpoint-classes: (small medium large);
85
92
 
86
93
  $grid-row-width: $global-width;
87
94
  $grid-column-count: 12;
88
- $grid-column-responsive-gutter: (
95
+ $grid-column-gutter: (
89
96
  small: 20px,
90
97
  medium: 30px,
91
98
  );
@@ -177,9 +184,9 @@ $stat-font-size: 2.5rem;
177
184
 
178
185
  $abide-inputs: true;
179
186
  $abide-labels: true;
180
- $input-background-invalid: $alert-color;
181
- $form-label-color-invalid: $alert-color;
182
- $input-error-color: $alert-color;
187
+ $input-background-invalid: map-get($foundation-palette, alert);
188
+ $form-label-color-invalid: map-get($foundation-palette, alert);
189
+ $input-error-color: map-get($foundation-palette, alert);
183
190
  $input-error-font-size: rem-calc(12);
184
191
  $input-error-font-weight: $global-weight-bold;
185
192
 
@@ -231,8 +238,8 @@ $button-margin: 0 0 $global-margin 0;
231
238
  $button-fill: solid;
232
239
  $button-background: $primary-color;
233
240
  $button-background-hover: scale-color($button-background, $lightness: -15%);
234
- $button-color: #fff;
235
- $button-color-alt: #000;
241
+ $button-color: $white;
242
+ $button-color-alt: $black;
236
243
  $button-radius: $global-radius;
237
244
  $button-sizes: (
238
245
  tiny: 0.6rem,
@@ -320,7 +327,7 @@ $fieldset-padding: rem-calc(20);
320
327
  $fieldset-margin: rem-calc(18 0);
321
328
  $legend-padding: rem-calc(0 3);
322
329
  $form-spacing: rem-calc(16);
323
- $helptext-color: #333;
330
+ $helptext-color: $black;
324
331
  $helptext-font-size: rem-calc(13);
325
332
  $helptext-font-style: italic;
326
333
  $input-prefix-color: $black;
@@ -332,9 +339,10 @@ $form-label-font-size: rem-calc(14);
332
339
  $form-label-font-weight: $global-weight-normal;
333
340
  $form-label-line-height: 1.8;
334
341
  $select-background: $white;
335
- $select-triangle-color: #333;
342
+ $select-triangle-color: $dark-gray;
336
343
  $select-radius: $global-radius;
337
344
  $input-color: $black;
345
+ $input-placeholder-color: $medium-gray;
338
346
  $input-font-family: inherit;
339
347
  $input-font-size: rem-calc(16);
340
348
  $input-background: $white;
@@ -371,10 +379,21 @@ $mediaobject-image-width-stacked: 100%;
371
379
  $menu-margin: 0;
372
380
  $menu-margin-nested: 1rem;
373
381
  $menu-item-padding: 0.7rem 1rem;
382
+ $menu-item-color-active: $white;
383
+ $menu-item-background-active: map-get($foundation-palette, primary);
374
384
  $menu-icon-spacing: 0.25rem;
375
- $menu-expand-max: 6;
376
385
 
377
- // 23. Off-canvas
386
+ // 23. Meter
387
+ // ---------
388
+
389
+ $meter-height: 1rem;
390
+ $meter-radius: $global-radius;
391
+ $meter-background: $medium-gray;
392
+ $meter-fill-good: $success-color;
393
+ $meter-fill-medium: $warning-color;
394
+ $meter-fill-bad: $alert-color;
395
+
396
+ // 24. Off-canvas
378
397
  // --------------
379
398
 
380
399
  $offcanvas-size: 250px;
@@ -387,7 +406,7 @@ $offcanvas-exit-background: rgba($white, 0.25);
387
406
  $maincontent-class: 'off-canvas-content';
388
407
  $maincontent-shadow: 0 0 10px rgba($black, 0.5);
389
408
 
390
- // 24. Orbit
409
+ // 25. Orbit
391
410
  // ---------
392
411
 
393
412
  $orbit-bullet-background: $medium-gray;
@@ -402,7 +421,7 @@ $orbit-control-background-hover: rgba($black, 0.5);
402
421
  $orbit-control-padding: 1rem;
403
422
  $orbit-control-zindex: 10;
404
423
 
405
- // 25. Pagination
424
+ // 26. Pagination
406
425
  // --------------
407
426
 
408
427
  $pagination-font-size: rem-calc(14);
@@ -419,7 +438,7 @@ $pagination-ellipsis-color: $black;
419
438
  $pagination-mobile-items: false;
420
439
  $pagination-arrows: true;
421
440
 
422
- // 26. Progress Bar
441
+ // 27. Progress Bar
423
442
  // ----------------
424
443
 
425
444
  $progress-height: 1rem;
@@ -428,24 +447,24 @@ $progress-margin-bottom: $global-margin;
428
447
  $progress-meter-background: $primary-color;
429
448
  $progress-radius: $global-radius;
430
449
 
431
- // 27. Reveal
450
+ // 28. Reveal
432
451
  // ----------
433
452
 
434
453
  $reveal-background: $white;
435
454
  $reveal-width: 600px;
436
455
  $reveal-max-width: $global-width;
437
- $reveal-offset: rem-calc(100);
438
456
  $reveal-padding: $global-padding;
439
457
  $reveal-border: 1px solid $medium-gray;
440
458
  $reveal-radius: $global-radius;
441
459
  $reveal-zindex: 1005;
442
460
  $reveal-overlay-background: rgba($black, 0.45);
443
461
 
444
- // 28. Slider
462
+ // 29. Slider
445
463
  // ----------
446
464
 
465
+ $slider-width-vertical: 0.5rem;
466
+ $slider-transition: all 0.2s ease-in-out;
447
467
  $slider-height: 0.5rem;
448
- $slider-width-vertical: $slider-height;
449
468
  $slider-background: $light-gray;
450
469
  $slider-fill-background: $medium-gray;
451
470
  $slider-handle-height: 1.4rem;
@@ -453,9 +472,8 @@ $slider-handle-width: 1.4rem;
453
472
  $slider-handle-background: $primary-color;
454
473
  $slider-opacity-disabled: 0.25;
455
474
  $slider-radius: $global-radius;
456
- $slider-transition: all 0.2s ease-in-out;
457
475
 
458
- // 29. Switch
476
+ // 30. Switch
459
477
  // ----------
460
478
 
461
479
  $switch-background: $medium-gray;
@@ -471,7 +489,7 @@ $switch-paddle-offset: 0.25rem;
471
489
  $switch-paddle-radius: $global-radius;
472
490
  $switch-paddle-transition: all 0.25s ease-out;
473
491
 
474
- // 30. Table
492
+ // 31. Table
475
493
  // ---------
476
494
 
477
495
  $table-background: $white;
@@ -488,14 +506,13 @@ $table-foot-background: smart-scale($table-background, $table-color-scale);
488
506
  $table-head-font-color: $body-font-color;
489
507
  $show-header-for-stacked: false;
490
508
 
491
- // 31. Tabs
509
+ // 32. Tabs
492
510
  // --------
493
511
 
494
512
  $tab-margin: 0;
495
513
  $tab-background: $white;
496
514
  $tab-background-active: $light-gray;
497
- $tab-border: $light-gray;
498
- $tab-item-color: foreground($tab-background, $primary-color);
515
+ $tab-item-font-size: rem-calc(12);
499
516
  $tab-item-background-hover: $white;
500
517
  $tab-item-padding: 1.25rem 1.5rem;
501
518
  $tab-expand-max: 6;
@@ -504,7 +521,7 @@ $tab-content-border: $light-gray;
504
521
  $tab-content-color: foreground($tab-background, $primary-color);
505
522
  $tab-content-padding: 1rem;
506
523
 
507
- // 32. Thumbnail
524
+ // 33. Thumbnail
508
525
  // -------------
509
526
 
510
527
  $thumbnail-border: solid 4px $white;
@@ -514,7 +531,7 @@ $thumbnail-shadow-hover: 0 0 6px 1px rgba($primary-color, 0.5);
514
531
  $thumbnail-transition: box-shadow 200ms ease-out;
515
532
  $thumbnail-radius: $global-radius;
516
533
 
517
- // 33. Title Bar
534
+ // 34. Title Bar
518
535
  // -------------
519
536
 
520
537
  $titlebar-background: $black;
@@ -525,7 +542,7 @@ $titlebar-icon-color: $white;
525
542
  $titlebar-icon-color-hover: $medium-gray;
526
543
  $titlebar-icon-spacing: 0.25rem;
527
544
 
528
- // 34. Tooltip
545
+ // 35. Tooltip
529
546
  // -----------
530
547
 
531
548
  $has-tip-font-weight: $global-weight-bold;
@@ -536,14 +553,14 @@ $tooltip-padding: 0.75rem;
536
553
  $tooltip-font-size: $small-font-size;
537
554
  $tooltip-pip-width: 0.75rem;
538
555
  $tooltip-pip-height: $tooltip-pip-width * 0.866;
539
- $tooltip-pip-offset: 1.25rem;
540
556
  $tooltip-radius: $global-radius;
541
557
 
542
- // 35. Top Bar
558
+ // 36. Top Bar
543
559
  // -----------
544
560
 
545
561
  $topbar-padding: 0.5rem;
546
562
  $topbar-background: $light-gray;
563
+ $topbar-submenu-background: $topbar-background;
547
564
  $topbar-title-spacing: 1rem;
548
565
  $topbar-input-width: 200px;
549
-
566
+ $topbar-unstack-breakpoint: medium;
@@ -435,5 +435,9 @@ $abbr-underline: 1px dotted $black !default;
435
435
  background-color: $keystroke-background;
436
436
  color: $keystroke-color;
437
437
  font-family: $keystroke-font;
438
+
439
+ @if has-value($keystroke-radius) {
440
+ border-radius: $keystroke-radius;
441
+ }
438
442
  }
439
443
  }
@@ -2,9 +2,10 @@
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;
8
9
 
9
10
  // scss-lint:disable all
10
11
 
@@ -13,7 +14,10 @@
13
14
 
14
15
  @media print {
15
16
  * {
16
- background: transparent !important;
17
+ @if $print-transparent-backgrounds {
18
+ background: transparent !important;
19
+ }
20
+
17
21
  color: black !important; // Black prints faster: h5bp.com/s
18
22
  box-shadow: none !important;
19
23
  text-shadow: none !important;
@@ -45,7 +49,7 @@
45
49
  // Prevent page breaks in the middle of a blockquote or preformatted text block
46
50
  pre,
47
51
  blockquote {
48
- border: 1px solid #999;
52
+ border: 1px solid $dark-gray;
49
53
  page-break-inside: avoid;
50
54
  }
51
55
 
@@ -18,6 +18,13 @@ $breakpoints: (
18
18
  xxlarge: 1440px,
19
19
  ) !default;
20
20
 
21
+ @if not map-has-key($breakpoints, small) or not map-has-key($breakpoints, medium) {
22
+ @error 'Your list of breakpoints (defined in $breakpoints) must include one named "small" and one named "medium".';
23
+ }
24
+ @else if map-get($breakpoints, small) != 0 {
25
+ @error 'Your "small" breakpoint (defined in $breakpoints) must be set to "0".';
26
+ }
27
+
21
28
  /// 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
29
  /// @type List
23
30
  $breakpoint-classes: (small medium large) !default;
@@ -49,15 +56,7 @@ $breakpoint-classes: (small medium large) !default;
49
56
  @if type-of($bp) == 'string' {
50
57
  @if map-has-key($breakpoints, $bp) {
51
58
  @if $dir == 'only' or $dir == 'down' {
52
- $next-bp: -zf-map-next($breakpoints, $bp);
53
-
54
- @if $next-bp == null {
55
- $bp-max: null;
56
- @warn 'breakpoint(): the media query "#{$val}" cannot be used because #{$bp} is the largest breakpoint.';
57
- }
58
- @else {
59
- $bp-max: $next-bp;
60
- }
59
+ $bp-max: -zf-map-next($breakpoints, $bp);
61
60
  }
62
61
 
63
62
  $bp: map-get($breakpoints, $bp);
@@ -74,37 +73,44 @@ $breakpoint-classes: (small medium large) !default;
74
73
  $bp-max: -zf-bp-to-em($bp-max) - (1/16);
75
74
  }
76
75
 
77
- // Skip media query creation if the input is "0 up"
76
+ // Conditions to skip media query creation
77
+ // - It's a named breakpoint that resolved to "0 down" or "0 up"
78
+ // - It's a numeric breakpoint that resolved to "0 " + anything
78
79
  @if $bp > 0em or $dir == 'only' or $dir == 'down' {
79
80
  // `only` ranges use the format `(min-width: n) and (max-width: n)`
80
81
  @if $dir == 'only' {
82
+ // Only named media queries can have an "only" range
81
83
  @if $named == true {
82
- $str: $str + '(min-width: #{$bp})';
84
+ // Only use "min-width" if the floor is greater than 0
85
+ @if $bp > 0em {
86
+ $str: $str + '(min-width: #{$bp})';
87
+
88
+ // Only add "and" to the media query if there's a ceiling
89
+ @if $bp-max != null {
90
+ $str: $str + ' and ';
91
+ }
92
+ }
83
93
 
94
+ // Only use "max-width" if there's a ceiling
84
95
  @if $bp-max != null {
85
- $str: $str + ' and (max-width: #{$bp-max})';
96
+ $str: $str + '(max-width: #{$bp-max})';
86
97
  }
87
98
  }
88
99
  @else {
89
- @warn 'Only named media queries can have an `only` range.';
100
+ @warn 'breakpoint(): Only named media queries can have an `only` range.';
90
101
  }
91
102
  }
92
103
 
93
104
  // `down` ranges use the format `(max-width: n)`
94
105
  @else if $dir == 'down' {
95
- $max: 0;
96
-
97
- // For named breakpoints, subtract the breakpoint value by one "pixel", or 1/16em.
98
- @if $named {
99
- $max: $bp-max;
100
- }
101
- @else {
102
- $max: $bp;
103
- }
106
+ $max: if($named, $bp-max, $bp);
104
107
 
105
- // Skip media query creation if input value is exactly "0 down" but don't "small down"
108
+ // Skip media query creation if input value is exactly "0 down",
109
+ // unless the function was called as "small down", in which case it's just "small only"
106
110
  @if $named or $bp > 0em {
107
- $str: $str + '(max-width: #{$max})';
111
+ @if $max != null {
112
+ $str: $str + '(max-width: #{$max})';
113
+ }
108
114
  }
109
115
  }
110
116
 
@@ -229,7 +235,7 @@ $breakpoint-classes: (small medium large) !default;
229
235
  }
230
236
 
231
237
  // Legacy breakpoint variables
232
- // These will be removed in 6.2
238
+ // These will be removed in 6.3
233
239
  $small-up: null;
234
240
  $small-only: null;
235
241
  $medium-up: null;
@@ -39,3 +39,22 @@
39
39
  }
40
40
  @return scale-color($color, $lightness: $scale);
41
41
  }
42
+
43
+ /// Transfers the colors in the `$foundation-palette` variable into the legacy color variables, such as `$primary-color` and `$secondary-color`. Call this mixin below the Global section of your settings file to properly migrate your codebase.
44
+ @mixin add-foundation-colors() {
45
+ @if map-has-key($foundation-palette, primary) {
46
+ $primary-color: map-get($foundation-palette, primary) !global;
47
+ }
48
+ @if map-has-key($foundation-palette, secondary) {
49
+ $secondary-color: map-get($foundation-palette, secondary) !global;
50
+ }
51
+ @if map-has-key($foundation-palette, success) {
52
+ $success-color: map-get($foundation-palette, success) !global;
53
+ }
54
+ @if map-has-key($foundation-palette, warning) {
55
+ $warning-color: map-get($foundation-palette, warning) !global;
56
+ }
57
+ @if map-has-key($foundation-palette, alert) {
58
+ $alert-color: map-get($foundation-palette, alert) !global;
59
+ }
60
+ }
@@ -0,0 +1,68 @@
1
+ $-zf-flex-justify: (
2
+ 'left': flex-start,
3
+ 'right': flex-end,
4
+ 'center': center,
5
+ 'justify': space-between,
6
+ 'spaced': space-around,
7
+ );
8
+
9
+ $-zf-flex-align: (
10
+ 'top': flex-start,
11
+ 'bottom': flex-end,
12
+ 'middle': center,
13
+ 'stretch': stretch,
14
+ );
15
+
16
+ /// Enables flexbox by adding `display: flex` to the element.
17
+ @mixin flex {
18
+ display: flex;
19
+ }
20
+
21
+ /// Horizontally or vertically aligns the items within a flex container.
22
+ ///
23
+ /// @param {Keyword} $x [null] - Horizontal alignment to use. Can be `left`, `right`, `center`, `justify`, or `spaced`. Or, set it to `null` (the default) to not set horizontal alignment.
24
+ /// @param {Keyword} $y [null] - Vertical alignment to use. Can be `top`, `bottom`, `middle`, or `stretch`. Or, set it to `null` (the default) to not set vertical alignment.
25
+ @mixin flex-align($x: null, $y: null) {
26
+ @if $x {
27
+ @if map-has-key($-zf-flex-justify, $x) {
28
+ $x: map-get($-zf-flex-justify, $x);
29
+ }
30
+ @else {
31
+ @warn 'flex-grid-row-align(): #{$x} is not a valid value for horizontal alignment. Use left, right, center, justify, or spaced.'
32
+ }
33
+ }
34
+
35
+ @if $y {
36
+ @if map-has-key($-zf-flex-align, $y) {
37
+ $y: map-get($-zf-flex-align, $y);
38
+ }
39
+ @else {
40
+ @warn 'flex-grid-row-align(): #{$y} is not a valid value for vertical alignment. Use top, bottom, middle, or stretch.'
41
+ }
42
+ }
43
+
44
+ justify-content: $x;
45
+ align-items: $y;
46
+ }
47
+
48
+ /// Vertically align a single column within a flex row. Apply this mixin to a flex column.
49
+ ///
50
+ /// @param {Keyword} $y [null] - Vertical alignment to use. Can be `top`, `bottom`, `middle`, or `stretch`. Or, set it to `null` (the default) to not set vertical alignment.
51
+ @mixin flex-align-self($y: null) {
52
+ @if $y {
53
+ @if map-has-key($-zf-flex-align, $y) {
54
+ $y: map-get($-zf-flex-align, $y);
55
+ }
56
+ @else {
57
+ @warn 'flex-grid-column-align(): #{$y} is not a valid value for alignment. Use top, bottom, middle, or stretch.'
58
+ }
59
+ }
60
+
61
+ align-self: $y;
62
+ }
63
+
64
+ /// Changes the source order of a flex child. Children with lower numbers appear first in the layout.
65
+ /// @param {Number} $order [0] - Order number to apply.
66
+ @mixin flex-order($order: 0) {
67
+ order: $order;
68
+ }