foundation-rails 6.3.0.0 → 6.3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +1 -1
  4. data/LICENSE.txt +1 -1
  5. data/Rakefile +1 -1
  6. data/bower.json +2 -2
  7. data/lib/foundation/rails/version.rb +1 -1
  8. data/lib/generators/foundation/templates/_settings.scss +0 -1
  9. data/vendor/assets/js/foundation.abide.js.es6 +26 -13
  10. data/vendor/assets/js/foundation.accordion.js.es6 +94 -5
  11. data/vendor/assets/js/foundation.accordionMenu.js.es6 +4 -2
  12. data/vendor/assets/js/foundation.core.js.es6 +1 -1
  13. data/vendor/assets/js/foundation.drilldown.js.es6 +44 -21
  14. data/vendor/assets/js/foundation.dropdown.js.es6 +26 -12
  15. data/vendor/assets/js/foundation.dropdownMenu.js.es6 +24 -13
  16. data/vendor/assets/js/foundation.equalizer.js.es6 +6 -3
  17. data/vendor/assets/js/foundation.interchange.js.es6 +5 -1
  18. data/vendor/assets/js/foundation.magellan.js.es6 +14 -7
  19. data/vendor/assets/js/foundation.offcanvas.js.es6 +70 -15
  20. data/vendor/assets/js/foundation.orbit.js.es6 +36 -18
  21. data/vendor/assets/js/foundation.responsiveMenu.js.es6 +0 -3
  22. data/vendor/assets/js/foundation.responsiveToggle.js.es6 +12 -16
  23. data/vendor/assets/js/foundation.reveal.js.es6 +39 -19
  24. data/vendor/assets/js/foundation.slider.js.es6 +37 -19
  25. data/vendor/assets/js/foundation.sticky.js.es6 +61 -25
  26. data/vendor/assets/js/foundation.tabs.js.es6 +74 -46
  27. data/vendor/assets/js/foundation.toggler.js.es6 +2 -1
  28. data/vendor/assets/js/foundation.tooltip.js.es6 +30 -15
  29. data/vendor/assets/js/foundation.util.timerAndImageLoader.js.es6 +1 -1
  30. data/vendor/assets/js/foundation.util.triggers.js.es6 +0 -47
  31. data/vendor/assets/scss/_global.scss +6 -0
  32. data/vendor/assets/scss/components/_accordion.scss +1 -1
  33. data/vendor/assets/scss/components/_breadcrumbs.scss +5 -2
  34. data/vendor/assets/scss/components/_button-group.scss +18 -8
  35. data/vendor/assets/scss/components/_button.scss +46 -8
  36. data/vendor/assets/scss/components/_card.scss +1 -1
  37. data/vendor/assets/scss/components/_flex.scss +6 -0
  38. data/vendor/assets/scss/components/_menu.scss +30 -3
  39. data/vendor/assets/scss/components/_responsive-embed.scss +6 -2
  40. data/vendor/assets/scss/components/_reveal.scss +2 -2
  41. data/vendor/assets/scss/foundation.scss +3 -3
  42. data/vendor/assets/scss/grid/_classes.scss +6 -2
  43. data/vendor/assets/scss/grid/_column.scss +1 -1
  44. data/vendor/assets/scss/grid/_flex-grid.scss +22 -2
  45. data/vendor/assets/scss/grid/_grid.scss +4 -0
  46. data/vendor/assets/scss/settings/_settings.scss +0 -1
  47. data/vendor/assets/scss/typography/_base.scss +1 -1
  48. data/vendor/assets/scss/typography/_print.scss +5 -0
  49. data/vendor/assets/scss/util/_direction.scss +31 -0
  50. data/vendor/assets/scss/util/_math.scss +1 -1
  51. data/vendor/assets/scss/util/_typography.scss +26 -0
  52. data/vendor/assets/scss/util/_util.scss +2 -0
  53. data/vendor/assets/scss/util/_value.scss +20 -0
  54. metadata +5 -3
@@ -67,7 +67,7 @@ function onImagesLoaded(images, callback){
67
67
  else {
68
68
  // fix for IE. See https://css-tricks.com/snippets/jquery/fixing-load-in-ie-for-cached-images/
69
69
  var src = $(this).attr('src');
70
- $(this).attr('src', src + '?' + (new Date().getTime()));
70
+ $(this).attr('src', src + (src.indexOf('?') >= 0 ? '&' : '?') + (new Date().getTime()));
71
71
  $(this).one('load', function() {
72
72
  singleImageLoaded();
73
73
  });
@@ -76,7 +76,6 @@ function checkListeners() {
76
76
  eventsListener();
77
77
  resizeListener();
78
78
  scrollListener();
79
- mutateListener();
80
79
  closemeListener();
81
80
  }
82
81
 
@@ -156,17 +155,6 @@ function scrollListener(debounce){
156
155
  }
157
156
  }
158
157
 
159
- function mutateListener(debounce) {
160
- let $nodes = $('[data-mutate]');
161
- if ($nodes.length && MutationObserver){
162
- //trigger all listening elements and signal a mutate event
163
- //no IE 9 or 10
164
- $nodes.each(function () {
165
- $(this).triggerHandler('mutateme.zf.trigger');
166
- });
167
- }
168
- }
169
-
170
158
  function eventsListener() {
171
159
  if(!MutationObserver){ return false; }
172
160
  let nodes = document.querySelectorAll('[data-resize], [data-scroll], [data-mutate]');
@@ -220,38 +208,3 @@ Foundation.IHearYou = checkListeners;
220
208
  // Foundation.IFeelYou = closemeListener;
221
209
 
222
210
  }(jQuery);
223
-
224
- // function domMutationObserver(debounce) {
225
- // // !!! This is coming soon and needs more work; not active !!! //
226
- // var timer,
227
- // nodes = document.querySelectorAll('[data-mutate]');
228
- // //
229
- // if (nodes.length) {
230
- // // var MutationObserver = (function () {
231
- // // var prefixes = ['WebKit', 'Moz', 'O', 'Ms', ''];
232
- // // for (var i=0; i < prefixes.length; i++) {
233
- // // if (prefixes[i] + 'MutationObserver' in window) {
234
- // // return window[prefixes[i] + 'MutationObserver'];
235
- // // }
236
- // // }
237
- // // return false;
238
- // // }());
239
- //
240
- //
241
- // //for the body, we need to listen for all changes effecting the style and class attributes
242
- // var bodyObserver = new MutationObserver(bodyMutation);
243
- // bodyObserver.observe(document.body, { attributes: true, childList: true, characterData: false, subtree:true, attributeFilter:["style", "class"]});
244
- //
245
- //
246
- // //body callback
247
- // function bodyMutation(mutate) {
248
- // //trigger all listening elements and signal a mutation event
249
- // if (timer) { clearTimeout(timer); }
250
- //
251
- // timer = setTimeout(function() {
252
- // bodyObserver.disconnect();
253
- // $('[data-mutate]').attr('data-events',"mutate");
254
- // }, debounce || 150);
255
- // }
256
- // }
257
- // }
@@ -167,6 +167,7 @@ $alert-color: get-color(alert);
167
167
 
168
168
  // Make select elements are 100% width by default
169
169
  select {
170
+ box-sizing: border-box;
170
171
  width: 100%;
171
172
  border-radius: $global-radius;
172
173
  }
@@ -196,6 +197,11 @@ $alert-color: get-color(alert);
196
197
  line-height: 1;
197
198
  }
198
199
 
200
+ // Prevent text overflow on pre
201
+ pre {
202
+ overflow: auto;
203
+ }
204
+
199
205
  // Internal classes to show/hide elements in JavaScript
200
206
  .is-visible {
201
207
  display: block !important;
@@ -105,7 +105,7 @@ $accordion-content-padding: 1rem !default;
105
105
  }
106
106
 
107
107
  .is-active > &::before {
108
- content: '';
108
+ content: '\2013';
109
109
  }
110
110
  }
111
111
  }
@@ -38,6 +38,10 @@ $breadcrumbs-item-uppercase: true !default;
38
38
  /// @type Boolean
39
39
  $breadcrumbs-item-slash: true !default;
40
40
 
41
+ /// Color of breadcrumb slash.
42
+ /// @type Color
43
+ $breadcrumbs-item-slash-color: $medium-gray !default;
44
+
41
45
  /// Adds styles for a breadcrumbs container, along with the styles for the `<li>` and `<a>` elements inside of it.
42
46
  @mixin breadcrumbs-container {
43
47
  @include clearfix;
@@ -64,10 +68,9 @@ $breadcrumbs-item-slash: true !default;
64
68
  position: relative;
65
69
  top: 1px;
66
70
  margin: 0 $breadcrumbs-item-margin;
67
-
68
71
  opacity: 1;
69
72
  content: $slash;
70
- color: $medium-gray;
73
+ color: $breadcrumbs-item-slash-color;
71
74
  }
72
75
  }
73
76
  @else {
@@ -11,7 +11,7 @@
11
11
  $buttongroup-margin: 1rem !default;
12
12
 
13
13
  /// Margin between buttons in a button group.
14
- /// @type Border
14
+ /// @type Number
15
15
  $buttongroup-spacing: 1px !default;
16
16
 
17
17
  /// Selector for the buttons inside a button group.
@@ -28,8 +28,10 @@ $buttongroup-radius-on-each: true !default;
28
28
 
29
29
  /// Add styles for a button group container.
30
30
  /// @param {String} $child-selector [$buttongroup-child-selector] - Selector for the buttons inside a button group.
31
+ /// @param {Number} $spacing [$buttongroup-spacing] - Spacing between buttons in a button group.
31
32
  @mixin button-group(
32
- $child-selector: $buttongroup-child-selector
33
+ $child-selector: $buttongroup-child-selector,
34
+ $spacing: $buttongroup-spacing
33
35
  ) {
34
36
  @include clearfix;
35
37
  margin-bottom: $buttongroup-margin;
@@ -45,8 +47,8 @@ $buttongroup-radius-on-each: true !default;
45
47
 
46
48
  #{$child-selector} {
47
49
  margin: 0;
48
- margin-#{$global-right}: $buttongroup-spacing;
49
- margin-bottom: $buttongroup-spacing;
50
+ margin-#{$global-right}: $spacing;
51
+ margin-bottom: $spacing;
50
52
  font-size: map-get($button-sizes, default);
51
53
 
52
54
  @if $global-flexbox {
@@ -76,12 +78,14 @@ $buttongroup-radius-on-each: true !default;
76
78
 
77
79
  /// Creates a full-width button group, making each button equal width.
78
80
  /// @param {String} $selector [$buttongroup-child-selector] - Selector for the buttons inside a button group.
81
+ /// @param {Number} $spacing [$buttongroup-spacing] - Spacing between buttons in a button group.
79
82
  @mixin button-group-expand(
80
83
  $selector: $buttongroup-child-selector,
84
+ $spacing: $buttongroup-spacing,
81
85
  $count: null
82
86
  ) {
83
87
  @if not $global-flexbox {
84
- margin-#{$global-right}: -$buttongroup-spacing;
88
+ margin-#{$global-right}: -$spacing;
85
89
 
86
90
  &::before,
87
91
  &::after {
@@ -94,15 +98,21 @@ $buttongroup-radius-on-each: true !default;
94
98
  flex: 1 1 0px; // sass-lint:disable-line zero-unit
95
99
  }
96
100
  @else {
101
+ // One child
102
+ &:first-child:last-child {
103
+ width: 100%
104
+ }
105
+
106
+ // Two or more childreen
97
107
  @for $i from 2 through $buttongroup-expand-max {
98
108
  &:first-child:nth-last-child(#{$i}) {
99
109
  &, &:first-child:nth-last-child(#{$i}) ~ #{$selector} {
100
110
  display: inline-block;
101
- width: calc(#{percentage(1 / $i)} - #{$buttongroup-spacing});
102
- margin-#{$global-right}: $buttongroup-spacing;
111
+ width: calc(#{percentage(1 / $i)} - #{$spacing});
112
+ margin-#{$global-right}: $spacing;
103
113
 
104
114
  &:last-child {
105
- margin-#{$global-right}: $buttongroup-spacing * -$buttongroup-expand-max;
115
+ margin-#{$global-right}: $spacing * -$buttongroup-expand-max;
106
116
  }
107
117
  }
108
118
  }
@@ -38,6 +38,10 @@ $button-color-alt: $black !default;
38
38
  /// @type Number
39
39
  $button-radius: $global-radius !default;
40
40
 
41
+ /// Border width for hollow outline buttons
42
+ /// @type Number
43
+ $button-hollow-border-width: 1px !default;
44
+
41
45
  /// Sizes for buttons.
42
46
  /// @type Map
43
47
  $button-sizes: (
@@ -78,7 +82,17 @@ $button-transition: background-color 0.25s ease-out, color 0.25s ease-out !defau
78
82
  display: inline-block;
79
83
  vertical-align: middle;
80
84
  margin: $button-margin;
81
- padding: $button-padding;
85
+
86
+ @if (type-of($button-padding) == 'map') {
87
+ @each $size, $padding in $button-padding {
88
+ @include breakpoint($size) {
89
+ padding: $padding;
90
+ }
91
+ }
92
+ }
93
+ @else {
94
+ padding: $button-padding;
95
+ }
82
96
 
83
97
  -webkit-appearance: none;
84
98
  border: 1px solid transparent;
@@ -144,11 +158,12 @@ $button-transition: background-color 0.25s ease-out, color 0.25s ease-out !defau
144
158
 
145
159
  @mixin button-hollow-style(
146
160
  $color: $primary-color,
147
- $hover-lightness: $button-hollow-hover-lightness
161
+ $hover-lightness: $button-hollow-hover-lightness,
162
+ $border-width: $button-hollow-border-width
148
163
  ) {
149
164
  $color-hover: scale-color($color, $lightness: $hover-lightness);
150
165
 
151
- border: 1px solid $color;
166
+ border: $border-width solid $color;
152
167
  color: $color;
153
168
 
154
169
  &:hover, &:focus {
@@ -158,13 +173,22 @@ $button-transition: background-color 0.25s ease-out, color 0.25s ease-out !defau
158
173
  }
159
174
 
160
175
  /// Adds disabled styles to a button by fading the element, reseting the cursor, and disabling pointer events.
161
- @mixin button-disabled($color: $primary-color) {
176
+ /// @param [Color] $background [$primary-color] - Background color of the disabled button.
177
+ /// @param [Color] $color [$button-color] - Text color of the disabled button. Set to `auto` to have the mixin automatically generate a color based on the background color.
178
+ @mixin button-disabled(
179
+ $background: $primary-color,
180
+ $color: $button-color
181
+ ) {
182
+ @if $color == auto {
183
+ $color: color-pick-contrast($background, ($button-color, $button-color-alt));
184
+ }
185
+
162
186
  opacity: $button-opacity-disabled;
163
187
  cursor: not-allowed;
164
188
 
165
- &:hover, &:focus {
166
- background-color: $color;
167
- color: $button-color;
189
+ &, &:hover, &:focus {
190
+ background-color: $background;
191
+ color: $color;
168
192
  }
169
193
  }
170
194
 
@@ -268,7 +292,7 @@ $button-transition: background-color 0.25s ease-out, color 0.25s ease-out !defau
268
292
 
269
293
  @each $name, $color in $button-palette {
270
294
  &.#{$name} {
271
- @include button-disabled($color);
295
+ @include button-disabled($color, auto);
272
296
  }
273
297
  }
274
298
  }
@@ -282,6 +306,20 @@ $button-transition: background-color 0.25s ease-out, color 0.25s ease-out !defau
282
306
  border-top-color: $button-background;
283
307
  }
284
308
  }
309
+
310
+ &.hollow {
311
+ &::after {
312
+ border-top-color: $button-background;
313
+ }
314
+
315
+ @each $name, $color in $button-palette {
316
+ &.#{$name} {
317
+ &::after {
318
+ border-top-color: $color;
319
+ }
320
+ }
321
+ }
322
+ }
285
323
  }
286
324
 
287
325
  // Button with dropdown arrow only
@@ -67,7 +67,7 @@ $card-margin: $global-margin !default;
67
67
  box-shadow: $shadow;
68
68
 
69
69
  overflow: hidden;
70
- color: $card-font-color;
70
+ color: $color;
71
71
 
72
72
  & > :last-child {
73
73
  margin-bottom: 0;
@@ -17,6 +17,12 @@
17
17
  }
18
18
  }
19
19
 
20
+ // Central alignment of content
21
+ .align-center-middle {
22
+ @include flex-align($x: center, $y: middle);
23
+ align-content: center;
24
+ }
25
+
20
26
  // Source ordering
21
27
  @include -zf-each-breakpoint {
22
28
  @for $i from 1 through 6 {
@@ -140,16 +140,33 @@ $menu-border: $light-gray !default;
140
140
  }
141
141
 
142
142
  /// Creates a simple Menu, which has no padding or hover state.
143
- @mixin menu-simple {
143
+ /// @param {Keyword} $dir [$global-left] - Direction of the menu. Set to `null` to do not generate styles for direction.
144
+ @mixin menu-simple($dir: $global-left) {
144
145
  li {
145
146
  display: inline-block;
146
- margin-#{$global-right}: get-side($menu-item-padding, $global-right);
147
+ vertical-align: top;
147
148
  line-height: 1;
148
149
  }
149
150
 
150
151
  a {
151
152
  padding: 0;
152
153
  }
154
+
155
+ @if $dir != null {
156
+ @include menu-simple-direction($dir);
157
+ }
158
+ }
159
+
160
+ /// Direction modifier for a simple Menu
161
+ /// @param {Keyword} $dir [$global-left] - Direction of the menu
162
+ @mixin menu-simple-direction($dir: $global-left) {
163
+ $no-margin-dir: $dir;
164
+ $margin-dir: direction-opposite($dir);
165
+
166
+ li {
167
+ margin-#{$no-margin-dir}: 0;
168
+ margin-#{$margin-dir}: get-side($menu-item-padding, $margin-dir);
169
+ }
153
170
  }
154
171
 
155
172
  /// Adds styles for a nested Menu, by adding `margin-left` to the menu.
@@ -273,6 +290,10 @@ $menu-border: $light-gray !default;
273
290
  // Simple
274
291
  &.simple {
275
292
  @include menu-simple;
293
+
294
+ &.align-#{$global-right} {
295
+ @include menu-simple-direction($global-right);
296
+ }
276
297
  }
277
298
 
278
299
  // Align right
@@ -338,7 +359,13 @@ $menu-border: $light-gray !default;
338
359
  text-align: center;
339
360
 
340
361
  > .menu {
341
- display: inline-block;
362
+ @if $global-flexbox {
363
+ @include flex-align($x: center, $y: top);
364
+ }
365
+ @else {
366
+ display: inline-block;
367
+ vertical-align: top;
368
+ }
342
369
  }
343
370
  }
344
371
 
@@ -17,6 +17,9 @@ $responsive-embed-ratios: (
17
17
  widescreen: 16 by 9,
18
18
  ) !default;
19
19
 
20
+ // WARNING: Will be removed in version 6.4
21
+ $responsive-embed-ratio: default;
22
+
20
23
  /// Creates a responsive embed container.
21
24
  /// @param {String|List} $ratio [default] - Ratio of the container. Can be a key from the `$responsive-embed-ratios` map or a list formatted as `x by y`.
22
25
  @mixin responsive-embed($ratio: default) {
@@ -42,7 +45,8 @@ $responsive-embed-ratios: (
42
45
  }
43
46
 
44
47
  @mixin foundation-responsive-embed {
45
- .responsive-embed, .flex-video {
48
+ .responsive-embed,
49
+ .flex-video {
46
50
  @include responsive-embed($ratio: default);
47
51
 
48
52
  $ratios: map-remove($responsive-embed-ratios,default);
@@ -62,5 +66,5 @@ $responsive-embed-ratios: (
62
66
 
63
67
  @mixin flex-video($ratio: $responsive-embed-ratio) {
64
68
  @warn 'This mixin is being replaced by responsive-embed(). flex-video() will be removed in Foundation 6.4.';
65
- @include responsive-embed;
69
+ @include responsive-embed($ratio);
66
70
  }
@@ -72,8 +72,7 @@ $reveal-overlay-background: rgba($black, 0.45) !default;
72
72
  }
73
73
 
74
74
  // Make sure rows don't have a min-width on them
75
- .column,
76
- .columns {
75
+ .column {
77
76
  min-width: 0;
78
77
  }
79
78
 
@@ -124,6 +123,7 @@ $reveal-overlay-background: rgba($black, 0.45) !default;
124
123
  html.is-reveal-open body {
125
124
  min-height: 100%;
126
125
  overflow: hidden;
126
+ position: fixed;
127
127
  user-select: none;
128
128
  }
129
129
 
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * Foundation for Sites by ZURB
3
- * Version 6.3.0
3
+ * Version 6.3.1
4
4
  * foundation.zurb.com
5
5
  * Licensed under MIT Open Source
6
6
  */
7
7
 
8
8
  // Dependencies
9
- @import "../_vendor/normalize-scss/sass/normalize";
9
+ @import '../_vendor/normalize-scss/sass/normalize';
10
10
  @import '../_vendor/sassy-lists/stylesheets/helpers/missing-dependencies';
11
11
  @import '../_vendor/sassy-lists/stylesheets/helpers/true';
12
12
  @import '../_vendor/sassy-lists/stylesheets/functions/purge';
@@ -17,7 +17,7 @@
17
17
  // Settings
18
18
  // import your own `settings` here or
19
19
  // import and modify the default settings through
20
- // @import "settings/settings";
20
+ // @import 'settings/settings';
21
21
 
22
22
  // Sass utilities
23
23
  @import 'util/util';