foundation-rails 6.4.1.3 → 6.4.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -2
  3. data/app/views/foundation/rails/styleguide/show.html.erb +8 -8
  4. data/bower.json +2 -2
  5. data/lib/foundation/rails/version.rb +1 -1
  6. data/lib/generators/foundation/install_generator.rb +1 -0
  7. data/lib/generators/foundation/templates/_settings.scss +9 -3
  8. data/lib/generators/foundation/templates/browserslist +4 -0
  9. data/vendor/assets/_vendor/sassy-lists/stylesheets/functions/_contain.scss +31 -0
  10. data/vendor/assets/js/foundation.abide.js +1 -1
  11. data/vendor/assets/js/foundation.accordionMenu.js +2 -2
  12. data/vendor/assets/js/foundation.core.js +1 -1
  13. data/vendor/assets/js/foundation.drilldown.js +3 -3
  14. data/vendor/assets/js/foundation.dropdown.js +41 -21
  15. data/vendor/assets/js/foundation.dropdownMenu.js +4 -5
  16. data/vendor/assets/js/foundation.js +1 -3
  17. data/vendor/assets/js/foundation.offcanvas.js +11 -9
  18. data/vendor/assets/js/foundation.orbit.js +1 -1
  19. data/vendor/assets/js/foundation.reveal.js +2 -3
  20. data/vendor/assets/js/foundation.slider.js +8 -9
  21. data/vendor/assets/js/foundation.sticky.js +2 -3
  22. data/vendor/assets/js/foundation.toggler.js +2 -3
  23. data/vendor/assets/js/foundation.tooltip.js +2 -3
  24. data/vendor/assets/js/foundation.util.box.js +12 -13
  25. data/vendor/assets/js/foundation.util.mediaQuery.js +1 -0
  26. data/vendor/assets/js/foundation.util.triggers.js +2 -3
  27. data/vendor/assets/scss/_global.scss +5 -3
  28. data/vendor/assets/scss/components/_button-group.scss +1 -1
  29. data/vendor/assets/scss/components/_button.scss +6 -0
  30. data/vendor/assets/scss/components/_dropdown-menu.scss +2 -0
  31. data/vendor/assets/scss/components/_menu.scss +15 -1
  32. data/vendor/assets/scss/components/_off-canvas.scss +106 -43
  33. data/vendor/assets/scss/forms/_input-group.scss +9 -2
  34. data/vendor/assets/scss/foundation.scss +2 -1
  35. data/vendor/assets/scss/grid/_flex-grid.scss +0 -4
  36. data/vendor/assets/scss/grid/_position.scss +1 -1
  37. data/vendor/assets/scss/prototype/_prototype.scss +0 -4
  38. data/vendor/assets/scss/prototype/_rounded.scss +1 -1
  39. data/vendor/assets/scss/settings/_settings.scss +9 -3
  40. data/vendor/assets/scss/typography/_base.scss +8 -8
  41. data/vendor/assets/scss/util/_breakpoint.scss +11 -3
  42. data/vendor/assets/scss/util/_mixins.scss +3 -6
  43. data/vendor/assets/scss/xy-grid/_cell.scss +2 -12
  44. data/vendor/assets/scss/xy-grid/_classes.scss +40 -19
  45. data/vendor/assets/scss/xy-grid/_collapse.scss +35 -15
  46. data/vendor/assets/scss/xy-grid/_frame.scss +40 -9
  47. data/vendor/assets/scss/xy-grid/_grid.scss +4 -25
  48. data/vendor/assets/scss/xy-grid/_gutters.scss +2 -2
  49. data/vendor/assets/scss/xy-grid/_layout.scss +1 -1
  50. data/vendor/assets/scss/xy-grid/_xy-grid.scss +3 -4
  51. metadata +5 -5
  52. data/vendor/assets/js/foundation.util.timerAndImageLoader.js +0 -90
  53. data/vendor/assets/js/foundation.zf.responsiveAccordionTabs.js +0 -262
@@ -106,6 +106,7 @@ $input-prefix-padding: 1rem !default;
106
106
  text-align: center;
107
107
 
108
108
  @if $global-flexbox {
109
+ display: flex;
109
110
  flex: 0 0 auto;
110
111
  }
111
112
  @else {
@@ -118,10 +119,16 @@ $input-prefix-padding: 1rem !default;
118
119
  button,
119
120
  label {
120
121
  @extend %input-group-child;
121
- height: $height;
122
+
123
+ @if $global-flexbox {
124
+ height: auto;
125
+ align-self: stretch;
126
+ }
127
+ @else {
128
+ height: $height;
129
+ }
122
130
  padding-top: 0;
123
131
  padding-bottom: 0;
124
-
125
132
  font-size: $input-font-size;
126
133
  }
127
134
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Foundation for Sites by ZURB
3
- * Version 6.4.1
3
+ * Version 6.4.3
4
4
  * foundation.zurb.com
5
5
  * Licensed under MIT Open Source
6
6
  */
@@ -9,6 +9,7 @@
9
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
+ @import '../_vendor/sassy-lists/stylesheets/functions/contain';
12
13
  @import '../_vendor/sassy-lists/stylesheets/functions/purge';
13
14
  @import '../_vendor/sassy-lists/stylesheets/functions/remove';
14
15
  @import '../_vendor/sassy-lists/stylesheets/functions/replace';
@@ -88,10 +88,6 @@
88
88
  @if $columns == expand {
89
89
  min-width: 0;
90
90
  }
91
- // max-width fixes IE 10/11 not respecting the flex-basis property
92
- @if $columns != expand and $columns != shrink {
93
- max-width: grid-column($columns);
94
- }
95
91
  }
96
92
 
97
93
  /// Creates a block grid for a flex grid row.
@@ -32,7 +32,7 @@
32
32
  /// Reset a position definition.
33
33
  @mixin grid-column-unposition {
34
34
  position: static;
35
- float: left;
35
+ float: $global-left;
36
36
  margin-right: 0;
37
37
  margin-left: 0;
38
38
  }
@@ -15,9 +15,6 @@
15
15
  // Rotate Mixin
16
16
  @import 'rotate';
17
17
 
18
- // Typescale
19
- @import 'typescale';
20
-
21
18
  // Text utilities
22
19
  @import 'text-utilities';
23
20
 
@@ -70,7 +67,6 @@
70
67
  @import 'spacing';
71
68
 
72
69
  @mixin foundation-prototype-classes {
73
- @include foundation-prototype-typescale;
74
70
  @include foundation-prototype-text-utilities;
75
71
  @include foundation-prototype-text-transformation;
76
72
  @include foundation-prototype-text-decoration;
@@ -45,7 +45,7 @@ $prototype-border-radius: rem-calc(3) !default;
45
45
  @include border-rounded;
46
46
  }
47
47
  .#{$size}-radius {
48
- @include rounded-radius;
48
+ @include border-radius;
49
49
  }
50
50
  }
51
51
  }
@@ -95,6 +95,7 @@ $global-menu-nested-margin: 1rem;
95
95
  $global-text-direction: ltr;
96
96
  $global-flexbox: true;
97
97
  $global-prototype-breakpoints: false;
98
+ $global-button-cursor: auto;
98
99
  $global-color-pick-contrast-tolerance: 0;
99
100
  $print-transparent-backgrounds: true;
100
101
 
@@ -477,6 +478,7 @@ $menu-icon-spacing: 0.25rem;
477
478
  $menu-item-background-hover: $light-gray;
478
479
  $menu-state-back-compat: true;
479
480
  $menu-centered-back-compat: true;
481
+ $menu-icons-back-compat: true;
480
482
 
481
483
  // 24. Meter
482
484
  // ---------
@@ -491,8 +493,12 @@ $meter-fill-bad: $alert-color;
491
493
  // 25. Off-canvas
492
494
  // --------------
493
495
 
494
- $offcanvas-size: 250px;
495
- $offcanvas-vertical-size: 250px;
496
+ $offcanvas-sizes: (
497
+ small: 250px,
498
+ );
499
+ $offcanvas-vertical-sizes: (
500
+ small: 250px,
501
+ );
496
502
  $offcanvas-background: $light-gray;
497
503
  $offcanvas-shadow: 0 0 10px rgba($black, 0.7);
498
504
  $offcanvas-inner-shadow-size: 20px;
@@ -859,5 +865,5 @@ $grid-margin-gutters: (
859
865
  $grid-padding-gutters: $grid-margin-gutters;
860
866
  $grid-container-padding: $grid-padding-gutters;
861
867
  $grid-container-max: $global-width;
862
- $block-grid-max: 8;
868
+ $xy-block-grid-max: 8;
863
869
 
@@ -147,7 +147,7 @@ $anchor-color: $primary-color !default;
147
147
  /// @type Color
148
148
  $anchor-color-hover: scale-color($anchor-color, $lightness: -14%) !default;
149
149
 
150
- /// Default text deocration for links.
150
+ /// Default text decoration for links.
151
151
  /// @type String
152
152
  $anchor-text-decoration: none !default;
153
153
 
@@ -306,12 +306,12 @@ $abbr-underline: 1px dotted $black !default;
306
306
  }
307
307
 
308
308
  // Headings
309
- h1,
310
- h2,
311
- h3,
312
- h4,
313
- h5,
314
- h6 {
309
+ h1, .h1,
310
+ h2, .h2,
311
+ h3, .h3,
312
+ h4, .h4,
313
+ h5, .h5,
314
+ h6, .h6 {
315
315
  font-family: $header-font-family;
316
316
  font-style: $header-font-style;
317
317
  font-weight: $header-font-weight;
@@ -329,7 +329,7 @@ $abbr-underline: 1px dotted $black !default;
329
329
  @include breakpoint($size) {
330
330
  @each $header, $header-defs in $headers {
331
331
  $font-size-temp: 1rem;
332
- #{$header} {
332
+ #{$header}, .#{$header} {
333
333
 
334
334
  @if map-has-key($header-defs, font-size) {
335
335
  $font-size-temp: rem-calc(map-get($header-defs, font-size));
@@ -144,8 +144,12 @@ $breakpoint-classes: (small medium large) !default;
144
144
  $bp: index($-zf-breakpoints-keys, $value);
145
145
  $pbp: index($-zf-breakpoints-keys, $print-breakpoint);
146
146
 
147
+ $old-zf-size: null;
148
+
147
149
  // Make breakpoint size available as a variable
148
- $old-zf-size: $-zf-zero-breakpoint;
150
+ @if global-variable-exists(-zf-size) {
151
+ $old-zf-size: $-zf-size;
152
+ }
149
153
  $-zf-size: nth($value, 1) !global; // get the first value to account for `only` and `down` keywords
150
154
 
151
155
  // If $str is still an empty string, no media query is needed
@@ -168,8 +172,12 @@ $breakpoint-classes: (small medium large) !default;
168
172
  }
169
173
  }
170
174
 
171
- // Restore the old breakpoint size
172
- $-zf-size: $old-zf-size !global;
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;
180
+ }
173
181
  }
174
182
 
175
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.
@@ -21,14 +21,11 @@
21
21
 
22
22
  @if ($side == top) {
23
23
  box-shadow: inset 0 $helper $size (-1)*$helper $color;
24
- }
25
- @elseif ($side == left) {
24
+ } @else if ($side == left) {
26
25
  box-shadow: inset $helper 0 $size (-1)*$helper $color;
27
- }
28
- @elseif ($side == right) {
26
+ } @else if ($side == right) {
29
27
  box-shadow: inset (-1)*$helper 0 $size (-1)*$helper $color;
30
- }
31
- @elseif ($side == bottom) {
28
+ } @else if ($side == bottom) {
32
29
  box-shadow: inset 0 (-1)*$helper $size (-1)*$helper $color;
33
30
  }
34
31
  }
@@ -108,7 +108,7 @@
108
108
  ) {
109
109
  @if($breakpoint == null) {
110
110
  // If `$bp-size` is available then use this, otherwise revert to the smallest bp.
111
- @if(variable-exists(-zf-size) and type-of($-zf-size) != 'number') {
111
+ @if(variable-exists(-zf-size) and type-of($-zf-size) != 'number') and $-zf-size != null {
112
112
  $breakpoint: $-zf-size;
113
113
  }
114
114
  @else {
@@ -130,17 +130,7 @@
130
130
  }
131
131
 
132
132
  @if $gutter-output {
133
- // If gutters = map
134
- @if(type-of($gutters) == 'map') {
135
- // If $gutters map has a key = $breakpoint, output the value
136
- @if (map-has-key($gutters, $breakpoint)) {
137
- @include xy-gutters($gutter, $gutter-type, $gutter-position);
138
- }
139
- }
140
- // If not a map
141
- @else {
142
- @include xy-gutters($gutter, $gutter-type, $gutter-position);
143
- }
133
+ @include xy-gutters($gutter, $gutter-type, $gutter-position);
144
134
  }
145
135
  }
146
136
 
@@ -12,10 +12,14 @@
12
12
  // Grid Container
13
13
  .grid-container {
14
14
  @include xy-grid-container;
15
- }
16
15
 
17
- .grid-container-padded {
18
- @include xy-grid-container-padding;
16
+ &.fluid {
17
+ @include xy-grid-container(100%);
18
+ }
19
+
20
+ &.full {
21
+ @include xy-grid-container(100%, 0);
22
+ }
19
23
  }
20
24
 
21
25
  // Base grid styles
@@ -53,9 +57,9 @@
53
57
  // https://github.com/zurb/foundation-sites/pull/10222 and
54
58
  // https://github.com/zurb/foundation-sites/pull/10164
55
59
  .grid-x {
56
- $str: "> #{$-zf-size}-shrink, > #{$-zf-size}-full";
60
+ $str: "> .#{$-zf-size}-shrink, > .#{$-zf-size}-full";
57
61
  @for $i from 1 through $grid-columns {
58
- $str: $str + ", > #{$-zf-size}-#{$i}"
62
+ $str: $str + ", > .#{$-zf-size}-#{$i}"
59
63
  }
60
64
  #{$str} {
61
65
  flex-basis: auto;
@@ -164,6 +168,12 @@
164
168
  @include xy-gutters($negative: true);
165
169
  }
166
170
 
171
+ // Negative margin for grids within `grid-container/grid-container.fluid`
172
+ // This allows margin and padding grids to line up with eachother
173
+ .grid-container:not(.full) > & {
174
+ @include xy-gutters($negative: true);
175
+ }
176
+
167
177
  // Base cell styles
168
178
  > .cell {
169
179
  @include xy-gutters($gutters: $grid-padding-gutters, $gutter-type: padding);
@@ -175,7 +185,7 @@
175
185
  @mixin xy-block-grid-classes($margin-grid: true, $padding-grid: true) {
176
186
  @if $padding-grid {
177
187
  @include -zf-each-breakpoint {
178
- @for $i from 1 through $block-grid-max {
188
+ @for $i from 1 through $xy-block-grid-max {
179
189
  .#{$-zf-size}-up-#{$i} {
180
190
  @include xy-grid-layout($i, '.cell', false, $gutter-type: padding);
181
191
  }
@@ -185,7 +195,7 @@
185
195
 
186
196
  @if $margin-grid {
187
197
  @include -zf-each-breakpoint {
188
- @for $i from 1 through $block-grid-max {
198
+ @for $i from 1 through $xy-block-grid-max {
189
199
  // This is purely for responsive gutters - the margin grid has to go back and adjust widths (or heights)
190
200
  // for prior breakpoints based on the responsive gutter.
191
201
  @if(type-of($grid-margin-gutters) == 'map' and map-has-key($grid-margin-gutters, $-zf-size)) {
@@ -198,7 +208,7 @@
198
208
  }
199
209
  }
200
210
  }
201
- @for $i from 1 through $block-grid-max {
211
+ @for $i from 1 through $xy-block-grid-max {
202
212
  .grid-margin-x.#{$-zf-size}-up-#{$i} {
203
213
  @include xy-grid-layout($i, '.cell', false, $gutter-type: margin, $breakpoint: $-zf-size);
204
214
  }
@@ -209,16 +219,16 @@
209
219
 
210
220
  // Collapse classes
211
221
  @mixin xy-collapse-grid-classes($margin-grid: true, $padding-grid: true) {
212
- @include -zf-each-breakpoint {
222
+ @each $bp in $breakpoint-classes {
213
223
  @if $margin-grid {
214
- .#{$-zf-size}-margin-collapse {
215
- @include xy-grid-collapse($gutter-type: margin);
224
+ .#{$bp}-margin-collapse {
225
+ @include xy-grid-collapse($gutter-type: margin, $min-breakpoint: $bp);
216
226
  }
217
227
  }
218
228
 
219
229
  @if $padding-grid {
220
- .#{$-zf-size}-padding-collapse {
221
- @include xy-grid-collapse($gutter-type: padding);
230
+ .#{$bp}-padding-collapse {
231
+ @include xy-grid-collapse($gutter-type: padding, $min-breakpoint: $bp);
222
232
  }
223
233
  }
224
234
  }
@@ -275,9 +285,9 @@
275
285
  // https://github.com/zurb/foundation-sites/issues/10244
276
286
  // https://github.com/zurb/foundation-sites/pull/10222 and
277
287
  // https://github.com/zurb/foundation-sites/pull/10164
278
- $str: "> #{$-zf-size}-shrink, > #{$-zf-size}-full";
288
+ $str: "> .#{$-zf-size}-shrink, > .#{$-zf-size}-full";
279
289
  @for $i from 1 through $grid-columns {
280
- $str: $str + ", > #{$-zf-size}-#{$i}"
290
+ $str: $str + ", > .#{$-zf-size}-#{$i}"
281
291
  }
282
292
  #{$str} {
283
293
  flex-basis: auto;
@@ -322,11 +332,12 @@
322
332
  }
323
333
 
324
334
  @if $margin-grid {
325
- @include xy-margin-grid-classes(top bottom, true, '.grid-margin-y')
335
+ @include xy-margin-grid-classes(top bottom, true, '.grid-margin-y');
326
336
  }
337
+
327
338
  }
328
339
 
329
- @mixin xy-frame-grid-classes($vertical-grid: true) {
340
+ @mixin xy-frame-grid-classes($vertical-grid: true, $margin-grid: true) {
330
341
  // Framed grid styles
331
342
  .grid-frame {
332
343
  @include xy-grid-frame;
@@ -374,7 +385,6 @@
374
385
  }
375
386
 
376
387
  @if $vertical-grid {
377
-
378
388
  .grid-y {
379
389
  &.grid-frame {
380
390
  width: auto;
@@ -400,6 +410,17 @@
400
410
  }
401
411
  }
402
412
  }
413
+ @if $margin-grid {
414
+ @include xy-margin-grid-classes(top bottom, true, '.grid-margin-y');
415
+ .grid-frame.grid-margin-y {
416
+ @include xy-grid-frame(true, false, $grid-margin-gutters, $include-base: false);
417
+ }
418
+ @include -zf-each-breakpoint(false) {
419
+ .grid-margin-y.#{$-zf-size}-grid-frame {
420
+ @include xy-grid-frame(true, false, $grid-margin-gutters, $-zf-size, false);
421
+ }
422
+ }
423
+ }
403
424
  }
404
425
 
405
426
  // Final classes
@@ -450,6 +471,6 @@
450
471
  }
451
472
 
452
473
  @if ($frame-grid) {
453
- @include xy-frame-grid-classes($vertical-grid)
474
+ @include xy-frame-grid-classes($vertical-grid, $margin-grid)
454
475
  }
455
476
  }
@@ -14,40 +14,60 @@
14
14
  @mixin xy-grid-collapse(
15
15
  $selector: '.cell',
16
16
  $gutter-type: margin,
17
- $gutter-position: right left
17
+ $gutter-position: right left,
18
+ $min-breakpoint: $-zf-zero-breakpoint
18
19
  ) {
19
20
  // First, lets negate any margins on the top level
20
21
  @if ($gutter-type == 'margin') {
21
22
 
22
- @each $value in $gutter-position {
23
- margin-#{$value}: 0;
24
- }
23
+ @include breakpoint($min-breakpoint) {
24
+ @each $value in $gutter-position {
25
+ margin-#{$value}: 0;
26
+ }
25
27
 
26
28
  > #{$selector} {
27
29
  @each $value in $gutter-position {
28
30
  margin-#{$value}: 0;
29
31
  }
30
32
  }
33
+ }
34
+
35
+ $excluded-bps: -zf-breakpoints-less-than($min-breakpoint);
31
36
 
32
37
  // Output new widths to not include gutters
33
38
  @each $bp in $breakpoint-classes {
34
- @for $i from 1 through $grid-columns {
35
- // Sizing (percentage)
36
- > .#{$bp}-#{$i} {
37
- @include xy-cell-static($i, $gutter-output: false, $gutter-type: padding);
39
+ @if(sl-contain($excluded-bps, $bp)) {
40
+ @include breakpoint($min-breakpoint) {
41
+ @for $i from 1 through $grid-columns {
42
+ // Sizing (percentage)
43
+ > .#{$bp}-#{$i} {
44
+ @include xy-cell-static($i, $gutter-output: false, $gutter-type: padding);
45
+ }
46
+ }
38
47
  }
39
- }
48
+ } @else {
49
+ @include breakpoint($bp) {
50
+ @for $i from 1 through $grid-columns {
51
+ // Sizing (percentage)
52
+ > .#{$bp}-#{$i} {
53
+ @include xy-cell-static($i, $gutter-output: false, $gutter-type: padding);
54
+ }
55
+ }
56
+ }
57
+ }
40
58
  }
41
59
  }
42
60
  @else {
43
61
 
44
- @each $value in $gutter-position {
45
- margin-#{$value}: 0;
46
- }
47
-
48
- > #{$selector} {
62
+ @include breakpoint($min-breakpoint) {
49
63
  @each $value in $gutter-position {
50
- padding-#{$value}: 0;
64
+ margin-#{$value}: 0;
65
+ }
66
+
67
+ > #{$selector} {
68
+ @each $value in $gutter-position {
69
+ padding-#{$value}: 0;
70
+ }
51
71
  }
52
72
  }
53
73
  }