foundation-rails 6.2.0.1 → 6.2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/bower.json +2 -2
  3. data/lib/foundation/rails/version.rb +1 -1
  4. data/lib/generators/foundation/templates/_settings.scss +2 -1
  5. data/lib/generators/foundation/templates/foundation_and_overrides.scss +1 -0
  6. data/vendor/assets/js/foundation.abide.js.es6 +89 -24
  7. data/vendor/assets/js/foundation.accordion.js.es6 +21 -23
  8. data/vendor/assets/js/foundation.accordionMenu.js.es6 +12 -11
  9. data/vendor/assets/js/foundation.core.js.es6 +1 -1
  10. data/vendor/assets/js/foundation.drilldown.js.es6 +35 -21
  11. data/vendor/assets/js/foundation.dropdown.js.es6 +8 -3
  12. data/vendor/assets/js/foundation.dropdownMenu.js.es6 +1 -1
  13. data/vendor/assets/js/foundation.equalizer.js.es6 +1 -1
  14. data/vendor/assets/js/foundation.interchange.js.es6 +1 -1
  15. data/vendor/assets/js/foundation.orbit.js.es6 +2 -1
  16. data/vendor/assets/js/foundation.responsiveMenu.js.es6 +19 -16
  17. data/vendor/assets/js/foundation.reveal.js.es6 +29 -15
  18. data/vendor/assets/js/foundation.slider.js.es6 +19 -3
  19. data/vendor/assets/js/foundation.toggler.js.es6 +2 -2
  20. data/vendor/assets/js/foundation.util.box.js.es6 +12 -0
  21. data/vendor/assets/js/foundation.util.mediaQuery.js.es6 +1 -1
  22. data/vendor/assets/scss/_global.scss +4 -3
  23. data/vendor/assets/scss/components/_breadcrumbs.scss +1 -0
  24. data/vendor/assets/scss/components/_button-group.scss +21 -14
  25. data/vendor/assets/scss/components/_button.scss +6 -4
  26. data/vendor/assets/scss/components/_callout.scss +1 -1
  27. data/vendor/assets/scss/components/_dropdown-menu.scss +2 -3
  28. data/vendor/assets/scss/components/_flex.scss +1 -1
  29. data/vendor/assets/scss/components/_media-object.scss +10 -5
  30. data/vendor/assets/scss/components/_menu.scss +1 -1
  31. data/vendor/assets/scss/components/_off-canvas.scss +1 -1
  32. data/vendor/assets/scss/components/_pagination.scss +1 -1
  33. data/vendor/assets/scss/components/_reveal.scss +2 -1
  34. data/vendor/assets/scss/components/_switch.scss +1 -1
  35. data/vendor/assets/scss/components/_table.scss +2 -2
  36. data/vendor/assets/scss/components/_top-bar.scss +18 -16
  37. data/vendor/assets/scss/components/_visibility.scss +4 -3
  38. data/vendor/assets/scss/forms/_checkbox.scss +4 -0
  39. data/vendor/assets/scss/forms/_input-group.scss +2 -2
  40. data/vendor/assets/scss/forms/_select.scss +1 -0
  41. data/vendor/assets/scss/forms/_text.scss +1 -1
  42. data/vendor/assets/scss/foundation.scss +1 -1
  43. data/vendor/assets/scss/grid/_flex-grid.scss +9 -7
  44. data/vendor/assets/scss/grid/_row.scss +2 -1
  45. data/vendor/assets/scss/settings/_settings.scss +2 -1
  46. data/vendor/assets/scss/typography/_alignment.scss +1 -1
  47. data/vendor/assets/scss/util/_breakpoint.scss +8 -6
  48. data/vendor/assets/scss/util/_mixins.scss +5 -3
  49. data/vendor/assets/scss/util/_value.scss +1 -1
  50. metadata +2 -2
@@ -6,7 +6,7 @@
6
6
  /// @group callout
7
7
  ////
8
8
 
9
- /// Defualt background color.
9
+ /// Default background color.
10
10
  /// @type Color
11
11
  $callout-background: $white !default;
12
12
 
@@ -124,7 +124,7 @@ $dropdownmenu-border-width: nth($dropdownmenu-border, 1);
124
124
  }
125
125
 
126
126
  @each $size in $breakpoint-classes {
127
- @if $size != small {
127
+ @if $size != $-zf-zero-breakpoint {
128
128
  @include breakpoint($size) {
129
129
  &.#{$size}-horizontal {
130
130
  @include dropdown-menu-direction(horizontal);
@@ -170,8 +170,7 @@ $dropdownmenu-border-width: nth($dropdownmenu-border, 1);
170
170
 
171
171
  &.opens-left .is-dropdown-submenu {
172
172
  left: auto;
173
- right: 0;
174
- top: 100%;
173
+ right: 100%;
175
174
  }
176
175
  }
177
176
 
@@ -20,7 +20,7 @@
20
20
  // Source ordering
21
21
  @include -zf-each-breakpoint {
22
22
  @for $i from 1 through 6 {
23
- .#{$-zf-size} {
23
+ .#{$-zf-size}-order-#{$i} {
24
24
  @include flex-order($i);
25
25
  }
26
26
  }
@@ -75,13 +75,13 @@ $mediaobject-image-width-stacked: 100% !default;
75
75
  }
76
76
 
77
77
  @if $global-flexbox {
78
- &.stack-for-small {
78
+ &.stack-for-#{$-zf-zero-breakpoint} {
79
79
  flex-wrap: wrap;
80
80
  }
81
81
  }
82
82
 
83
- &.stack-for-small .media-object-section {
84
- @include breakpoint(small only) {
83
+ &.stack-for-#{$-zf-zero-breakpoint} .media-object-section {
84
+ @include breakpoint($-zf-zero-breakpoint only) {
85
85
  @include media-object-stack;
86
86
  }
87
87
  }
@@ -97,8 +97,13 @@ $mediaobject-image-width-stacked: 100% !default;
97
97
  }
98
98
  }
99
99
  @else {
100
- &.middle { vertical-align: middle; }
101
- &.bottom { vertical-align: bottom; }
100
+ &.middle {
101
+ vertical-align: middle;
102
+ }
103
+
104
+ &.bottom {
105
+ vertical-align: bottom;
106
+ }
102
107
  }
103
108
  }
104
109
  }
@@ -234,7 +234,7 @@ $menu-icon-spacing: 0.25rem !default;
234
234
  }
235
235
 
236
236
  @each $size in $breakpoint-classes {
237
- @if $size != small {
237
+ @if $size != $-zf-zero-breakpoint {
238
238
  @include breakpoint($size) {
239
239
  &.#{$size}-horizontal {
240
240
  @include menu-direction(horizontal);
@@ -162,7 +162,7 @@ $maincontent-shadow: 0 0 10px rgba($black, 0.5) !default;
162
162
 
163
163
  // Reveal off-canvas menu on larger screens
164
164
  @each $name, $value in $breakpoint-classes {
165
- @if $name != small {
165
+ @if $name != $-zf-zero-breakpoint {
166
166
  @include breakpoint($name) {
167
167
  .position-left.reveal-for-#{$name} {
168
168
  @include off-canvas-reveal(left);
@@ -113,7 +113,7 @@ $pagination-arrows: true !default;
113
113
  @mixin pagination-item-disabled {
114
114
  padding: $pagination-item-padding;
115
115
  color: $pagination-item-color-disabled;
116
- cursor: default;
116
+ cursor: not-allowed;
117
117
 
118
118
  &:hover {
119
119
  background: transparent;
@@ -104,6 +104,7 @@ $reveal-overlay-background: rgba($black, 0.45) !default;
104
104
  max-width: none;
105
105
  margin-left: 0;
106
106
  border: 0;
107
+ border-radius: 0;
107
108
  }
108
109
 
109
110
  @mixin foundation-reveal {
@@ -153,7 +154,7 @@ $reveal-overlay-background: rgba($black, 0.45) !default;
153
154
  @include reveal-modal-fullscreen;
154
155
  }
155
156
 
156
- @include breakpoint(small only) {
157
+ @include breakpoint($-zf-zero-breakpoint only) {
157
158
  @include reveal-modal-fullscreen;
158
159
  }
159
160
 
@@ -179,7 +179,7 @@ $switch-paddle-transition: all 0.25s ease-out !default;
179
179
  height: $paddle-height;
180
180
  }
181
181
 
182
- input:checked ~ .switch-paddle:after {
182
+ input:checked ~ .switch-paddle::after {
183
183
  #{$global-left}: $paddle-left-active;
184
184
  }
185
185
  }
@@ -40,8 +40,8 @@ $table-row-stripe-hover: darken($table-background, $table-color-scale + $table-h
40
40
  /// @type Color
41
41
  $table-striped-background: smart-scale($table-background, $table-color-scale) !default;
42
42
 
43
- /// Default value for showing the stripe on rows of the tables, excluding the header and footer If even, the even rows will have a background color. If odd, the odd rows will have a background color. If empty, or anyother value, the table rows will have no striping.
44
- /// @type Keyoword
43
+ /// Default value for showing the stripe on rows of the tables, excluding the header and footer. If even, the even rows will have a background color. If odd, the odd rows will have a background color. If empty, or any other value, the table rows will have no striping.
44
+ /// @type Keyword
45
45
  $table-stripe: even !default;
46
46
 
47
47
  /// Default color for header background.
@@ -22,7 +22,7 @@ $topbar-submenu-background: $topbar-background !default;
22
22
  /// @type Number
23
23
  $topbar-title-spacing: 1rem !default;
24
24
 
25
- /// Width of `<input>` elements inside the top bar.
25
+ /// Maximum width of `<input>` elements inside the top bar.
26
26
  /// @type Number
27
27
  $topbar-input-width: 200px !default;
28
28
 
@@ -58,7 +58,7 @@ $topbar-unstack-breakpoint: medium !default;
58
58
 
59
59
  // Restrain width of inputs by default to make them easier to arrange
60
60
  input {
61
- width: $topbar-input-width;
61
+ max-width: $topbar-input-width;
62
62
  margin-#{$global-right}: 1rem;
63
63
  }
64
64
 
@@ -118,22 +118,24 @@ $topbar-unstack-breakpoint: medium !default;
118
118
  // Top bar container
119
119
  .top-bar {
120
120
  @include top-bar-container;
121
- }
122
121
 
123
- // Generate classes for stacking on each screen size (defined in $breakpoint-classes)
124
- @each $size in $breakpoint-classes {
125
- .stacked-for-#{$size} {
126
- @include breakpoint($size down) {
127
- @include top-bar-stacked;
128
- }
129
- }
130
- }
122
+ // Stack on small screens by default
123
+ @include top-bar-stacked;
131
124
 
132
- // Stack on small screens by default
133
- @include top-bar-stacked;
125
+ @include breakpoint($topbar-unstack-breakpoint) {
126
+ @include top-bar-unstack;
127
+ }
134
128
 
135
- @include breakpoint($topbar-unstack-breakpoint) {
136
- @include top-bar-unstack;
129
+ // Generate classes for stacking on each screen size (defined in $breakpoint-classes)
130
+ @each $size in $breakpoint-classes {
131
+ @if $size != $-zf-zero-breakpoint {
132
+ &.stacked-for-#{$size} {
133
+ @include breakpoint($size down) {
134
+ @include top-bar-stacked;
135
+ }
136
+ }
137
+ }
138
+ }
137
139
  }
138
140
 
139
141
  // Sub-sections
@@ -152,7 +154,7 @@ $topbar-unstack-breakpoint: medium !default;
152
154
  .top-bar-title {
153
155
  float: left;
154
156
  margin-right: $topbar-title-spacing;
155
-
157
+
156
158
  }
157
159
 
158
160
  .top-bar-left {
@@ -6,7 +6,7 @@
6
6
  /// @param {Keyword} $size - Breakpoint to use. **Must be a breakpoint defined in `$breakpoints`.**
7
7
  @mixin show-for($size) {
8
8
  $size: map-get($breakpoints, $size);
9
- $size: -zf-bp-to-em($size) - (1/16);
9
+ $size: -zf-bp-to-em($size) - (1 / 16);
10
10
 
11
11
  @include breakpoint($size down) {
12
12
  display: none !important;
@@ -20,7 +20,7 @@
20
20
  $upper-bound-size: -zf-map-next($breakpoints, $size);
21
21
 
22
22
  // more often than not this will be correct, just one time round the loop it won't so set in scope here
23
- $lower-bound: -zf-bp-to-em($lower-bound-size) - (1/16);
23
+ $lower-bound: -zf-bp-to-em($lower-bound-size) - (1 / 16);
24
24
  // test actual lower-bound-size, if 0 set it to 0em
25
25
  @if strip-unit($lower-bound-size) == 0 {
26
26
  $lower-bound: -zf-bp-to-em($lower-bound-size);
@@ -33,6 +33,7 @@
33
33
  }
34
34
  @else {
35
35
  $upper-bound: -zf-bp-to-em($upper-bound-size);
36
+
36
37
  @media screen and (max-width: $lower-bound), screen and (min-width: $upper-bound) {
37
38
  display: none !important;
38
39
  }
@@ -68,7 +69,7 @@
68
69
 
69
70
  // Responsive visibility classes
70
71
  @each $size in $breakpoint-classes {
71
- @if $size != small {
72
+ @if $size != $-zf-zero-breakpoint {
72
73
  .hide-for-#{$size} {
73
74
  @include hide-for($size);
74
75
  }
@@ -21,6 +21,10 @@
21
21
  margin-#{$global-right}: $form-spacing;
22
22
  margin-bottom: 0;
23
23
  vertical-align: baseline;
24
+
25
+ &[for] {
26
+ cursor: pointer;
27
+ }
24
28
  }
25
29
 
26
30
  // Styles for inputs inside labels
@@ -34,12 +34,12 @@ $input-prefix-padding: 1rem !default;
34
34
  }
35
35
 
36
36
  > :first-child {
37
- border-radius: $global-radius 0 0 $global-radius;
37
+ border-radius: if($global-text-direction == rtl, 0 $global-radius $global-radius 0, $global-radius 0 0 $global-radius);
38
38
  }
39
39
 
40
40
  > :last-child {
41
41
  > * {
42
- border-radius: 0 $global-radius $global-radius 0;
42
+ border-radius: if($global-text-direction == rtl, $global-radius 0 0 $global-radius, 0 $global-radius $global-radius 0);
43
43
  }
44
44
  }
45
45
  }
@@ -55,6 +55,7 @@ $select-radius: $global-radius !default;
55
55
 
56
56
  &[multiple] {
57
57
  height: auto;
58
+ background-image: none;
58
59
  }
59
60
  }
60
61
 
@@ -52,7 +52,7 @@ $input-shadow-focus: 0 0 5px $medium-gray !default;
52
52
 
53
53
  /// Cursor to use when hovering over a disabled text input.
54
54
  /// @type Cursor
55
- $input-cursor-disabled: default !default;
55
+ $input-cursor-disabled: not-allowed !default;
56
56
 
57
57
  /// Properties to transition on text inputs.
58
58
  /// @type Transition
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Foundation for Sites by ZURB
3
- * Version 6.2.0
3
+ * Version 6.2.1
4
4
  * foundation.zurb.com
5
5
  * Licensed under MIT Open Source
6
6
  */
@@ -96,6 +96,11 @@
96
96
  padding-right: $padding;
97
97
  }
98
98
 
99
+ // fixes recent Chrome version not limiting child width
100
+ // https://stackoverflow.com/questions/34934586/white-space-nowrap-and-flexbox-did-not-work-in-chrome
101
+ @if $columns == null {
102
+ min-width: 0;
103
+ }
99
104
  // max-width fixes IE 10/11 not respecting the flex-basis property
100
105
  @if $columns != null and $columns != shrink {
101
106
  max-width: grid-column($columns);
@@ -173,6 +178,7 @@
173
178
  // The double .row class is needed to bump up the specificity
174
179
  .column.row.row {
175
180
  float: none;
181
+ display: block;
176
182
 
177
183
  // To properly nest a column row, padding and margin is removed
178
184
  .row & {
@@ -204,20 +210,16 @@
204
210
  .#{$-zf-size}-order-#{$i} {
205
211
  @include flex-order($i);
206
212
  }
207
-
208
- .#{$-zf-size}-up-#{$i} {
209
- @include flex-grid-layout($i);
210
- }
211
213
  }
212
214
 
213
215
  // Block grid
214
216
  @for $i from 1 through $block-grid-max {
215
217
  .#{$-zf-size}-up-#{$i} {
216
- @include grid-layout($i);
218
+ @include flex-grid-layout($i);
217
219
  }
218
220
  }
219
221
 
220
- @if $-zf-size != small {
222
+ @if $-zf-size != $-zf-zero-breakpoint {
221
223
  // Sizing (expand)
222
224
  @include breakpoint($-zf-size) {
223
225
  .#{$-zf-size}-expand {
@@ -228,7 +230,7 @@
228
230
  // Auto-stacking/unstacking
229
231
  @at-root (without: media) {
230
232
  .row.#{$-zf-size}-unstack {
231
- .column {
233
+ > .column {
232
234
  flex: flex-grid-column(100%);
233
235
 
234
236
  @include breakpoint($-zf-size) {
@@ -80,11 +80,12 @@
80
80
  /// @param {Map|null} $gutter [null] - Gutter value to use when inverting the margins. Set to `null` to refer to the responsive gutter settings.
81
81
  @mixin grid-row-nest($gutter: $grid-column-gutter) {
82
82
  @if type-of($gutter) == 'number' {
83
- $gutter: (small: $gutter);
83
+ $gutter: ($-zf-zero-breakpoint: $gutter);
84
84
  }
85
85
 
86
86
  @each $breakpoint, $value in $gutter {
87
87
  $margin: rem-calc($value) / 2 * -1;
88
+ max-width: none;
88
89
 
89
90
  @include breakpoint($breakpoint) {
90
91
  margin-left: $margin;
@@ -352,7 +352,7 @@ $input-border: 1px solid $medium-gray;
352
352
  $input-border-focus: 1px solid $dark-gray;
353
353
  $input-shadow: inset 0 1px 2px rgba($black, 0.1);
354
354
  $input-shadow-focus: 0 0 5px $medium-gray;
355
- $input-cursor-disabled: default;
355
+ $input-cursor-disabled: not-allowed;
356
356
  $input-transition: box-shadow 0.5s, border-color 0.25s ease-in-out;
357
357
  $input-number-spinners: true;
358
358
  $input-radius: $global-radius;
@@ -564,3 +564,4 @@ $topbar-submenu-background: $topbar-background;
564
564
  $topbar-title-spacing: 1rem;
565
565
  $topbar-input-width: 200px;
566
566
  $topbar-unstack-breakpoint: medium;
567
+
@@ -6,7 +6,7 @@
6
6
  @each $size in $breakpoint-classes {
7
7
  @include breakpoint($size) {
8
8
  @each $align in (left, right, center, justify) {
9
- @if $size != 'small' {
9
+ @if $size != $-zf-zero-breakpoint {
10
10
  .#{$size}-text-#{$align} {
11
11
  text-align: $align;
12
12
  }
@@ -18,11 +18,12 @@ $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".';
21
+ $-zf-zero-breakpoint: small !default;
22
+
23
+ @if nth(map-values($breakpoints),1) != 0 {
24
+ @error 'Your smallest breakpoint (defined in $breakpoints) must be set to "0".';
25
+ } @else {
26
+ $-zf-zero-breakpoint: nth(map-keys($breakpoints),1);
26
27
  }
27
28
 
28
29
  /// 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.
@@ -32,7 +33,7 @@ $breakpoint-classes: (small medium large) !default;
32
33
  /// Generates a media query string matching the input value. Refer to the documentation for the `breakpoint()` mixin to see what the possible inputs are.
33
34
  ///
34
35
  /// @param {Keyword|Number} $val [small] - Breakpoint name, or px, rem, or em value to process.
35
- @function breakpoint($val: small) {
36
+ @function breakpoint($val: $-zf-zero-breakpoint) {
36
37
  // Size or keyword
37
38
  $bp: nth($val, 1);
38
39
  // Value for max-width media queries
@@ -64,6 +65,7 @@ $breakpoint-classes: (small medium large) !default;
64
65
  }
65
66
  @else {
66
67
  $bp: 0;
68
+ @warn 'breakpoint(): "#{$val}" is not defined in your $breakpoints setting.';
67
69
  }
68
70
  }
69
71
 
@@ -139,8 +139,10 @@
139
139
  &::after {
140
140
  content: ' ';
141
141
  display: table;
142
- flex-basis: 0;
143
- order: 1;
142
+ @if $global-flexbox {
143
+ flex-basis: 0;
144
+ order: 1;
145
+ }
144
146
  }
145
147
 
146
148
  &::after {
@@ -220,7 +222,7 @@
220
222
  $map: $breakpoint-classes;
221
223
 
222
224
  @if not $small {
223
- $map: map-remove($map, small);
225
+ $map: map-remove($map, $-zf-zero-breakpoint);
224
226
  }
225
227
 
226
228
  @each $size in $map {
@@ -98,7 +98,7 @@
98
98
  ///
99
99
  /// @param {Map} $map - Map to pull a value from.
100
100
  /// @param {String} $keys... - Keys to use when looking for a value.
101
- /// @return The value found in the map.
101
+ /// @returns {Mixed} The value found in the map.
102
102
  @function map-deep-get($map, $keys...) {
103
103
  @each $key in $keys {
104
104
  $map: map-get($map, $key);