foundation-rails 6.2.3.0 → 6.2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/bower.json +1 -1
  3. data/lib/foundation/rails/version.rb +1 -1
  4. data/lib/generators/foundation/templates/_settings.scss +7 -0
  5. data/vendor/assets/js/foundation.accordion.js.es6 +13 -24
  6. data/vendor/assets/js/foundation.accordionMenu.js.es6 +9 -10
  7. data/vendor/assets/js/foundation.core.js.es6 +1 -1
  8. data/vendor/assets/js/foundation.drilldown.js.es6 +21 -9
  9. data/vendor/assets/js/foundation.dropdown.js.es6 +11 -8
  10. data/vendor/assets/js/foundation.dropdownMenu.js.es6 +46 -21
  11. data/vendor/assets/js/foundation.equalizer.js.es6 +3 -1
  12. data/vendor/assets/js/foundation.interchange.js.es6 +1 -1
  13. data/vendor/assets/js/foundation.magellan.js.es6 +3 -1
  14. data/vendor/assets/js/foundation.offcanvas.js.es6 +41 -27
  15. data/vendor/assets/js/foundation.orbit.js.es6 +23 -15
  16. data/vendor/assets/js/foundation.reveal.js.es6 +10 -3
  17. data/vendor/assets/js/foundation.slider.js.es6 +1 -1
  18. data/vendor/assets/js/foundation.sticky.js.es6 +18 -7
  19. data/vendor/assets/js/foundation.tooltip.js.es6 +2 -1
  20. data/vendor/assets/js/foundation.util.box.js.es6 +2 -2
  21. data/vendor/assets/js/foundation.util.mediaQuery.js.es6 +1 -1
  22. data/vendor/assets/js/foundation.util.nest.js.es6 +1 -1
  23. data/vendor/assets/js/foundation.util.timerAndImageLoader.js.es6 +1 -1
  24. data/vendor/assets/js/foundation.util.triggers.js.es6 +1 -1
  25. data/vendor/assets/scss/components/_button.scss +24 -6
  26. data/vendor/assets/scss/components/_drilldown.scss +1 -1
  27. data/vendor/assets/scss/components/_off-canvas.scss +1 -0
  28. data/vendor/assets/scss/components/_orbit.scss +1 -0
  29. data/vendor/assets/scss/components/_pagination.scss +13 -2
  30. data/vendor/assets/scss/components/_reveal.scss +3 -3
  31. data/vendor/assets/scss/components/_switch.scss +4 -0
  32. data/vendor/assets/scss/components/_table.scss +39 -4
  33. data/vendor/assets/scss/components/_title-bar.scss +0 -4
  34. data/vendor/assets/scss/components/_top-bar.scss +4 -2
  35. data/vendor/assets/scss/forms/_input-group.scss +4 -3
  36. data/vendor/assets/scss/forms/_meter.scss +3 -1
  37. data/vendor/assets/scss/forms/_progress.scss +9 -0
  38. data/vendor/assets/scss/forms/_text.scss +6 -2
  39. data/vendor/assets/scss/foundation.scss +1 -1
  40. data/vendor/assets/scss/grid/_classes.scss +14 -10
  41. data/vendor/assets/scss/grid/_flex-grid.scss +19 -9
  42. data/vendor/assets/scss/grid/_layout.scss +27 -2
  43. data/vendor/assets/scss/grid/_position.scss +4 -1
  44. data/vendor/assets/scss/grid/_row.scss +1 -2
  45. data/vendor/assets/scss/settings/_settings.scss +7 -0
  46. data/vendor/assets/scss/util/_breakpoint.scss +12 -15
  47. data/vendor/assets/scss/util/_color.scss +13 -0
  48. data/vendor/assets/scss/util/_mixins.scss +6 -2
  49. data/vendor/assets/scss/util/_unit.scss +5 -0
  50. metadata +2 -2
@@ -17,7 +17,10 @@
17
17
  #{$global-left}: $offset;
18
18
  }
19
19
  @else if $position == center {
20
- float: none;
20
+ &, &:last-child:not(:first-child) {
21
+ float: none;
22
+ clear: both;
23
+ }
21
24
  margin-left: auto;
22
25
  margin-right: auto;
23
26
  }
@@ -29,7 +29,7 @@
29
29
  }
30
30
 
31
31
  // Restore the old column count
32
- $grid-column-count: $old-grid-column-count;
32
+ $grid-column-count: $old-grid-column-count !global;
33
33
  }
34
34
 
35
35
  /// Creates a grid row.
@@ -82,7 +82,6 @@
82
82
  @if type-of($gutter) == 'number' {
83
83
  $gutter: ($-zf-zero-breakpoint: $gutter);
84
84
  }
85
- max-width: none;
86
85
 
87
86
  @each $breakpoint, $value in $gutter {
88
87
  $margin: rem-calc($value) / 2 * -1;
@@ -248,6 +248,8 @@ $button-sizes: (
248
248
  large: 1.25rem,
249
249
  );
250
250
  $button-opacity-disabled: 0.25;
251
+ $button-background-hover-lightness: -20%;
252
+ $button-hollow-hover-lightness: -50%;
251
253
 
252
254
  // 12. Button Group
253
255
  // ----------------
@@ -356,6 +358,7 @@ $input-cursor-disabled: not-allowed;
356
358
  $input-transition: box-shadow 0.5s, border-color 0.25s ease-in-out;
357
359
  $input-number-spinners: true;
358
360
  $input-radius: $global-radius;
361
+ $button-radius: $global-radius;
359
362
 
360
363
  // 20. Label
361
364
  // ---------
@@ -436,6 +439,7 @@ $pagination-item-color-current: foreground($pagination-item-background-current);
436
439
  $pagination-item-color-disabled: $medium-gray;
437
440
  $pagination-ellipsis-color: $black;
438
441
  $pagination-mobile-items: false;
442
+ $pagination-mobile-current-item: false;
439
443
  $pagination-arrows: true;
440
444
 
441
445
  // 27. Progress Bar
@@ -502,8 +506,11 @@ $table-row-stripe-hover: darken($table-background, $table-color-scale + $table-h
502
506
  $table-striped-background: smart-scale($table-background, $table-color-scale);
503
507
  $table-stripe: even;
504
508
  $table-head-background: smart-scale($table-background, $table-color-scale / 2);
509
+ $table-head-row-hover: darken($table-head-background, $table-hover-scale);
505
510
  $table-foot-background: smart-scale($table-background, $table-color-scale);
511
+ $table-foot-row-hover: darken($table-foot-background, $table-hover-scale);
506
512
  $table-head-font-color: $body-font-color;
513
+ $table-foot-font-color: $body-font-color;
507
514
  $show-header-for-stacked: false;
508
515
 
509
516
  // 32. Tabs
@@ -175,29 +175,26 @@ $breakpoint-classes: (small medium large) !default;
175
175
  ///
176
176
  /// @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`.
177
177
  @function -zf-map-next($map, $key) {
178
- // Store the values of the map as a list, so we can access them with nth
179
- $values: map-values($map);
180
-
181
- // Ghetto for loop
182
- $i: 1;
183
- $found: false;
184
- @each $val in map-keys($map) {
185
- @if $found == false {
186
- @if ($key == $val) {
187
- $found: true;
188
- }
189
- $i: $i + 1;
190
- }
178
+
179
+ // Store the keys of the map as a list
180
+ $values: map-keys($map);
181
+
182
+ $i: 0;
183
+
184
+ // 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
185
+ @if (map-has-key($map, $key)) {
186
+ $i: index($values, $key) + 1;
191
187
  }
192
188
 
193
189
  // If the key doesn't exist, or it's the last key in the map, return null
194
- @if $i > length($map) {
190
+ @if ($i > length($map) or $i == 0) {
195
191
  @return null;
196
192
  }
197
193
  // Otherwise, return the value
198
194
  @else {
199
- @return nth($values, $i);
195
+ @return map-get($map, nth($values, $i));
200
196
  }
197
+
201
198
  }
202
199
 
203
200
  /// Get a value for a breakpoint from a responsive config map. If the config map has the key `$value`, the exact breakpoint value is returned. If the config map does *not* have the breakpoint, the value matching the next lowest breakpoint in the config map is returned.
@@ -40,6 +40,19 @@
40
40
  @return scale-color($color, $lightness: $scale);
41
41
  }
42
42
 
43
+ /// Get color from foundation-palette
44
+ ///
45
+ /// @param {key} color key from foundation-palette
46
+ ///
47
+ /// @returns {Color} color from foundation-palette
48
+ @function get-color($key) {
49
+ @if map-has-key($foundation-palette, $key) {
50
+ @return map-get($foundation-palette, $key);
51
+ } @else {
52
+ @error 'given $key is not available in $foundation-palette';
53
+ }
54
+ }
55
+
43
56
  /// 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
57
  @mixin add-foundation-colors() {
45
58
  @if map-has-key($foundation-palette, primary) {
@@ -65,7 +65,11 @@
65
65
  $hover-shadow: ();
66
66
 
67
67
  // Spacing between bars is calculated based on the total height of the icon and the weight of each bar
68
- $spacing: floor(($height - ($weight * $bars)) / ($bars - 1));
68
+ $spacing: ($height - ($weight * $bars)) / ($bars - 1);
69
+
70
+ @if unit($spacing) == 'px' {
71
+ $spacing: floor($spacing);
72
+ }
69
73
 
70
74
  // Icon container
71
75
  position: relative;
@@ -114,7 +118,7 @@
114
118
  ///
115
119
  /// @param {Color} $color [$black] - Color to use for the triangle.
116
120
  @mixin background-triangle($color: $black) {
117
- $rgb: 'rgb%28#{red($color)}, #{green($color)}, #{blue($color)}%29';
121
+ $rgb: 'rgb%28#{round(red($color))}, #{round(green($color))}, #{round(blue($color))}%29';
118
122
 
119
123
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='32' height='24' viewBox='0 0 32 24'><polygon points='0,0 32,0 16,24' style='fill: #{$rgb}'></polygon></svg>");
120
124
 
@@ -39,6 +39,11 @@ $global-font-size: 100% !default;
39
39
  @if unit($base) == '%' {
40
40
  $base: ($base / 100%) * 16px;
41
41
  }
42
+
43
+ // Using rem as base allows correct scaling
44
+ @if unit($base) == 'rem' {
45
+ $base: strip-unit($base) * 16px;
46
+ }
42
47
 
43
48
  @if $count == 1 {
44
49
  @return -zf-to-rem($values, $base);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foundation-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.3.0
4
+ version: 6.2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ZURB
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-31 00:00:00.000000000 Z
11
+ date: 2016-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass