foundation-rails 6.6.2.0 → 6.9.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (217) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +2 -0
  4. data/Appraisals +4 -0
  5. data/Gemfile +1 -1
  6. data/Gemfile.lock +198 -145
  7. data/bower.json +3 -3
  8. data/foundation-rails.gemspec +4 -4
  9. data/gemfiles/rails_7.1.gemfile +10 -0
  10. data/gemfiles/rails_7.1.gemfile.lock +261 -0
  11. data/lib/foundation/rails/version.rb +1 -1
  12. data/lib/generators/foundation/templates/_settings.scss +32 -28
  13. data/vendor/assets/js/foundation.cjs.js +1996 -3162
  14. data/vendor/assets/js/foundation.cjs.js.map +1 -1
  15. data/vendor/assets/js/foundation.es6.js +385 -292
  16. data/vendor/assets/js/foundation.es6.js.map +1 -1
  17. data/vendor/assets/js/foundation.esm.js +1663 -2832
  18. data/vendor/assets/js/foundation.esm.js.map +1 -1
  19. data/vendor/assets/js/foundation.js +2440 -3870
  20. data/vendor/assets/js/foundation.js.map +1 -1
  21. data/vendor/assets/js/foundation.min.js +1 -1
  22. data/vendor/assets/js/foundation.min.js.map +1 -1
  23. data/vendor/assets/js/plugins/foundation.abide.js +238 -344
  24. data/vendor/assets/js/plugins/foundation.abide.js.map +1 -1
  25. data/vendor/assets/js/plugins/foundation.abide.min.js +1 -1
  26. data/vendor/assets/js/plugins/foundation.abide.min.js.map +1 -1
  27. data/vendor/assets/js/plugins/foundation.accordion.js +197 -275
  28. data/vendor/assets/js/plugins/foundation.accordion.js.map +1 -1
  29. data/vendor/assets/js/plugins/foundation.accordion.min.js +1 -1
  30. data/vendor/assets/js/plugins/foundation.accordion.min.js.map +1 -1
  31. data/vendor/assets/js/plugins/foundation.accordionMenu.js +174 -260
  32. data/vendor/assets/js/plugins/foundation.accordionMenu.js.map +1 -1
  33. data/vendor/assets/js/plugins/foundation.accordionMenu.min.js +1 -1
  34. data/vendor/assets/js/plugins/foundation.accordionMenu.min.js.map +1 -1
  35. data/vendor/assets/js/plugins/foundation.core.js +308 -447
  36. data/vendor/assets/js/plugins/foundation.core.js.map +1 -1
  37. data/vendor/assets/js/plugins/foundation.core.min.js +1 -1
  38. data/vendor/assets/js/plugins/foundation.core.min.js.map +1 -1
  39. data/vendor/assets/js/plugins/foundation.drilldown.js +258 -358
  40. data/vendor/assets/js/plugins/foundation.drilldown.js.map +1 -1
  41. data/vendor/assets/js/plugins/foundation.drilldown.min.js +1 -1
  42. data/vendor/assets/js/plugins/foundation.drilldown.min.js.map +1 -1
  43. data/vendor/assets/js/plugins/foundation.dropdown.js +289 -457
  44. data/vendor/assets/js/plugins/foundation.dropdown.js.map +1 -1
  45. data/vendor/assets/js/plugins/foundation.dropdown.min.js +1 -1
  46. data/vendor/assets/js/plugins/foundation.dropdown.min.js.map +1 -1
  47. data/vendor/assets/js/plugins/foundation.dropdownMenu.js +246 -346
  48. data/vendor/assets/js/plugins/foundation.dropdownMenu.js.map +1 -1
  49. data/vendor/assets/js/plugins/foundation.dropdownMenu.min.js +1 -1
  50. data/vendor/assets/js/plugins/foundation.dropdownMenu.min.js.map +1 -1
  51. data/vendor/assets/js/plugins/foundation.equalizer.js +178 -261
  52. data/vendor/assets/js/plugins/foundation.equalizer.js.map +1 -1
  53. data/vendor/assets/js/plugins/foundation.equalizer.min.js +1 -1
  54. data/vendor/assets/js/plugins/foundation.equalizer.min.js.map +1 -1
  55. data/vendor/assets/js/plugins/foundation.interchange.js +227 -326
  56. data/vendor/assets/js/plugins/foundation.interchange.js.map +1 -1
  57. data/vendor/assets/js/plugins/foundation.interchange.min.js +1 -1
  58. data/vendor/assets/js/plugins/foundation.interchange.min.js.map +1 -1
  59. data/vendor/assets/js/plugins/foundation.magellan.js +225 -336
  60. data/vendor/assets/js/plugins/foundation.magellan.js.map +1 -1
  61. data/vendor/assets/js/plugins/foundation.magellan.min.js +1 -1
  62. data/vendor/assets/js/plugins/foundation.magellan.min.js.map +1 -1
  63. data/vendor/assets/js/plugins/foundation.offcanvas.js +326 -471
  64. data/vendor/assets/js/plugins/foundation.offcanvas.js.map +1 -1
  65. data/vendor/assets/js/plugins/foundation.offcanvas.min.js +1 -1
  66. data/vendor/assets/js/plugins/foundation.offcanvas.min.js.map +1 -1
  67. data/vendor/assets/js/plugins/foundation.orbit.js +244 -347
  68. data/vendor/assets/js/plugins/foundation.orbit.js.map +1 -1
  69. data/vendor/assets/js/plugins/foundation.orbit.min.js +1 -1
  70. data/vendor/assets/js/plugins/foundation.orbit.min.js.map +1 -1
  71. data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.js +203 -278
  72. data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.js.map +1 -1
  73. data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.min.js +1 -1
  74. data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.min.js.map +1 -1
  75. data/vendor/assets/js/plugins/foundation.responsiveMenu.js +205 -255
  76. data/vendor/assets/js/plugins/foundation.responsiveMenu.js.map +1 -1
  77. data/vendor/assets/js/plugins/foundation.responsiveMenu.min.js +1 -1
  78. data/vendor/assets/js/plugins/foundation.responsiveMenu.min.js.map +1 -1
  79. data/vendor/assets/js/plugins/foundation.responsiveToggle.js +170 -226
  80. data/vendor/assets/js/plugins/foundation.responsiveToggle.js.map +1 -1
  81. data/vendor/assets/js/plugins/foundation.responsiveToggle.min.js +1 -1
  82. data/vendor/assets/js/plugins/foundation.responsiveToggle.min.js.map +1 -1
  83. data/vendor/assets/js/plugins/foundation.reveal.js +284 -444
  84. data/vendor/assets/js/plugins/foundation.reveal.js.map +1 -1
  85. data/vendor/assets/js/plugins/foundation.reveal.min.js +1 -1
  86. data/vendor/assets/js/plugins/foundation.reveal.min.js.map +1 -1
  87. data/vendor/assets/js/plugins/foundation.slider.js +322 -483
  88. data/vendor/assets/js/plugins/foundation.slider.js.map +1 -1
  89. data/vendor/assets/js/plugins/foundation.slider.min.js +1 -1
  90. data/vendor/assets/js/plugins/foundation.slider.min.js.map +1 -1
  91. data/vendor/assets/js/plugins/foundation.smoothScroll.js +138 -188
  92. data/vendor/assets/js/plugins/foundation.smoothScroll.js.map +1 -1
  93. data/vendor/assets/js/plugins/foundation.smoothScroll.min.js +1 -1
  94. data/vendor/assets/js/plugins/foundation.smoothScroll.min.js.map +1 -1
  95. data/vendor/assets/js/plugins/foundation.sticky.js +253 -394
  96. data/vendor/assets/js/plugins/foundation.sticky.js.map +1 -1
  97. data/vendor/assets/js/plugins/foundation.sticky.min.js +1 -1
  98. data/vendor/assets/js/plugins/foundation.sticky.min.js.map +1 -1
  99. data/vendor/assets/js/plugins/foundation.tabs.js +228 -317
  100. data/vendor/assets/js/plugins/foundation.tabs.js.map +1 -1
  101. data/vendor/assets/js/plugins/foundation.tabs.min.js +1 -1
  102. data/vendor/assets/js/plugins/foundation.tabs.min.js.map +1 -1
  103. data/vendor/assets/js/plugins/foundation.toggler.js +207 -294
  104. data/vendor/assets/js/plugins/foundation.toggler.js.map +1 -1
  105. data/vendor/assets/js/plugins/foundation.toggler.min.js +1 -1
  106. data/vendor/assets/js/plugins/foundation.toggler.min.js.map +1 -1
  107. data/vendor/assets/js/plugins/foundation.tooltip.js +275 -434
  108. data/vendor/assets/js/plugins/foundation.tooltip.js.map +1 -1
  109. data/vendor/assets/js/plugins/foundation.tooltip.min.js +1 -1
  110. data/vendor/assets/js/plugins/foundation.tooltip.min.js.map +1 -1
  111. data/vendor/assets/js/plugins/foundation.util.box.js +130 -186
  112. data/vendor/assets/js/plugins/foundation.util.box.js.map +1 -1
  113. data/vendor/assets/js/plugins/foundation.util.box.min.js +1 -1
  114. data/vendor/assets/js/plugins/foundation.util.box.min.js.map +1 -1
  115. data/vendor/assets/js/plugins/foundation.util.imageLoader.js +110 -150
  116. data/vendor/assets/js/plugins/foundation.util.imageLoader.js.map +1 -1
  117. data/vendor/assets/js/plugins/foundation.util.imageLoader.min.js +1 -1
  118. data/vendor/assets/js/plugins/foundation.util.imageLoader.min.js.map +1 -1
  119. data/vendor/assets/js/plugins/foundation.util.keyboard.js +157 -172
  120. data/vendor/assets/js/plugins/foundation.util.keyboard.js.map +1 -1
  121. data/vendor/assets/js/plugins/foundation.util.keyboard.min.js +1 -1
  122. data/vendor/assets/js/plugins/foundation.util.keyboard.min.js.map +1 -1
  123. data/vendor/assets/js/plugins/foundation.util.mediaQuery.js +167 -233
  124. data/vendor/assets/js/plugins/foundation.util.mediaQuery.js.map +1 -1
  125. data/vendor/assets/js/plugins/foundation.util.mediaQuery.min.js +1 -1
  126. data/vendor/assets/js/plugins/foundation.util.mediaQuery.min.js.map +1 -1
  127. data/vendor/assets/js/plugins/foundation.util.motion.js +123 -161
  128. data/vendor/assets/js/plugins/foundation.util.motion.js.map +1 -1
  129. data/vendor/assets/js/plugins/foundation.util.motion.min.js +1 -1
  130. data/vendor/assets/js/plugins/foundation.util.motion.min.js.map +1 -1
  131. data/vendor/assets/js/plugins/foundation.util.nest.js +123 -160
  132. data/vendor/assets/js/plugins/foundation.util.nest.js.map +1 -1
  133. data/vendor/assets/js/plugins/foundation.util.nest.min.js +1 -1
  134. data/vendor/assets/js/plugins/foundation.util.nest.min.js.map +1 -1
  135. data/vendor/assets/js/plugins/foundation.util.timer.js +116 -171
  136. data/vendor/assets/js/plugins/foundation.util.timer.js.map +1 -1
  137. data/vendor/assets/js/plugins/foundation.util.timer.min.js +1 -1
  138. data/vendor/assets/js/plugins/foundation.util.timer.min.js.map +1 -1
  139. data/vendor/assets/js/plugins/foundation.util.touch.js +172 -228
  140. data/vendor/assets/js/plugins/foundation.util.touch.js.map +1 -1
  141. data/vendor/assets/js/plugins/foundation.util.touch.min.js +1 -1
  142. data/vendor/assets/js/plugins/foundation.util.touch.min.js.map +1 -1
  143. data/vendor/assets/js/plugins/foundation.util.triggers.js +158 -222
  144. data/vendor/assets/js/plugins/foundation.util.triggers.js.map +1 -1
  145. data/vendor/assets/js/plugins/foundation.util.triggers.min.js +1 -1
  146. data/vendor/assets/js/plugins/foundation.util.triggers.min.js.map +1 -1
  147. data/vendor/assets/scss/_global.scss +18 -5
  148. data/vendor/assets/scss/components/_accordion-menu.scss +2 -2
  149. data/vendor/assets/scss/components/_badge.scss +1 -1
  150. data/vendor/assets/scss/components/_breadcrumbs.scss +2 -1
  151. data/vendor/assets/scss/components/_button-group.scss +13 -8
  152. data/vendor/assets/scss/components/_button.scss +13 -13
  153. data/vendor/assets/scss/components/_callout.scss +2 -2
  154. data/vendor/assets/scss/components/_close-button.scss +5 -4
  155. data/vendor/assets/scss/components/_dropdown-menu.scss +1 -1
  156. data/vendor/assets/scss/components/_label.scss +1 -1
  157. data/vendor/assets/scss/components/_menu.scss +54 -19
  158. data/vendor/assets/scss/components/_off-canvas.scss +18 -16
  159. data/vendor/assets/scss/components/_orbit.scss +3 -3
  160. data/vendor/assets/scss/components/_pagination.scss +1 -1
  161. data/vendor/assets/scss/components/_progress-bar.scss +1 -1
  162. data/vendor/assets/scss/components/_responsive-embed.scss +1 -1
  163. data/vendor/assets/scss/components/_reveal.scss +8 -3
  164. data/vendor/assets/scss/components/_slider.scss +5 -2
  165. data/vendor/assets/scss/components/_switch.scss +25 -2
  166. data/vendor/assets/scss/components/_table.scss +8 -7
  167. data/vendor/assets/scss/components/_tabs.scss +2 -2
  168. data/vendor/assets/scss/components/_top-bar.scss +7 -5
  169. data/vendor/assets/scss/components/_visibility.scss +45 -2
  170. data/vendor/assets/scss/forms/_label.scss +2 -1
  171. data/vendor/assets/scss/forms/_progress.scss +1 -1
  172. data/vendor/assets/scss/forms/_range.scss +1 -1
  173. data/vendor/assets/scss/forms/_select.scss +5 -4
  174. data/vendor/assets/scss/forms/_text.scss +2 -2
  175. data/vendor/assets/scss/foundation.scss +1 -1
  176. data/vendor/assets/scss/grid/_classes.scss +1 -1
  177. data/vendor/assets/scss/grid/_column.scss +3 -2
  178. data/vendor/assets/scss/grid/_flex-grid.scss +7 -6
  179. data/vendor/assets/scss/grid/_gutter.scss +1 -1
  180. data/vendor/assets/scss/grid/_layout.scss +5 -5
  181. data/vendor/assets/scss/grid/_position.scss +4 -4
  182. data/vendor/assets/scss/grid/_row.scss +1 -1
  183. data/vendor/assets/scss/motion-ui/util/_animation.scss +1 -1
  184. data/vendor/assets/scss/motion-ui/util/_series.scss +1 -1
  185. data/vendor/assets/scss/motion-ui/util/_unit.scss +54 -1
  186. data/vendor/assets/scss/prototype/_border-none.scss +1 -1
  187. data/vendor/assets/scss/prototype/_font-styling.scss +2 -2
  188. data/vendor/assets/scss/prototype/_overflow.scss +9 -0
  189. data/vendor/assets/scss/prototype/_rotate.scss +7 -5
  190. data/vendor/assets/scss/prototype/_separator.scss +5 -5
  191. data/vendor/assets/scss/prototype/_shadow.scss +1 -2
  192. data/vendor/assets/scss/prototype/_spacing.scss +33 -33
  193. data/vendor/assets/scss/prototype/_text-transformation.scss +3 -3
  194. data/vendor/assets/scss/settings/_settings.scss +32 -28
  195. data/vendor/assets/scss/typography/_base.scss +6 -6
  196. data/vendor/assets/scss/typography/_helpers.scss +10 -2
  197. data/vendor/assets/scss/typography/_print.scss +2 -2
  198. data/vendor/assets/scss/util/_breakpoint.scss +21 -18
  199. data/vendor/assets/scss/util/_color.scss +20 -8
  200. data/vendor/assets/scss/util/_direction.scss +1 -1
  201. data/vendor/assets/scss/util/_flex.scss +1 -1
  202. data/vendor/assets/scss/util/_math.scss +61 -9
  203. data/vendor/assets/scss/util/_mixins.scss +18 -14
  204. data/vendor/assets/scss/util/_selector.scss +1 -15
  205. data/vendor/assets/scss/util/_typography.scss +6 -6
  206. data/vendor/assets/scss/util/_unit.scss +14 -8
  207. data/vendor/assets/scss/util/_value.scss +3 -18
  208. data/vendor/assets/scss/vendor/normalize.scss +19 -2
  209. data/vendor/assets/scss/xy-grid/_cell.scss +16 -5
  210. data/vendor/assets/scss/xy-grid/_classes.scss +8 -8
  211. data/vendor/assets/scss/xy-grid/_frame.scss +12 -0
  212. data/vendor/assets/scss/xy-grid/_grid.scss +2 -2
  213. data/vendor/assets/scss/xy-grid/_gutters.scss +2 -2
  214. data/vendor/assets/scss/xy-grid/_layout.scss +1 -1
  215. data/vendor/assets/scss/xy-grid/_position.scss +12 -7
  216. data/vendor/assets/scss/xy-grid/_xy-grid.scss +2 -2
  217. metadata +21 -19
@@ -38,12 +38,12 @@ $menu-item-background-active: get-color(primary) !default;
38
38
  /// @type Number
39
39
  $menu-icon-spacing: 0.25rem !default;
40
40
 
41
- /// Backward compatibility for menu state. If true, this duplicate `active` with `is-active`.
41
+ /// Backward compatibility for menu state. If true, this duplicate `active` with `is-active`.
42
42
  /// But please note that `active` will be removed in upcoming versions.
43
43
  /// @type Boolean
44
44
  $menu-state-back-compat: true !default;
45
45
 
46
- /// Backward compatibility for menu centered. If true, this duplicate `.menu-centered > .menu` with `.menu.align-center`.
46
+ /// Backward compatibility for menu centered. If true, this duplicate `.menu-centered > .menu` with `.menu.align-center`.
47
47
  /// But please note that `menu-centered` will be removed in upcoming versions.
48
48
  /// @type Boolean
49
49
  $menu-centered-back-compat: true !default;
@@ -258,6 +258,33 @@ $menu-icons-back-compat: true !default;
258
258
  }
259
259
  }
260
260
 
261
+ /// Align top/bottom icons within a menu.
262
+ /// @param {Keyword} $alignment [center] - Alignment of the icon
263
+ @mixin menu-icon-alignment($alignment: center) {
264
+ @if $global-flexbox {
265
+ &.icon-top,
266
+ &.icon-bottom {
267
+ li a {
268
+ img,
269
+ i,
270
+ svg {
271
+ @if $alignment == left {
272
+ text-align: left;
273
+ }
274
+
275
+ @else if $alignment == right {
276
+ text-align: right;
277
+ }
278
+
279
+ @else {
280
+ text-align: center;
281
+ }
282
+ }
283
+ }
284
+ }
285
+ }
286
+ }
287
+
261
288
  /// Adds position classes for icons within a menu.
262
289
  @mixin menu-icon-position($position: left, $spacing: $menu-icon-spacing) {
263
290
  @if $position == left {
@@ -369,11 +396,13 @@ $menu-icons-back-compat: true !default;
369
396
  // Vertical orientation modifier
370
397
  &.vertical {
371
398
  @include menu-direction(vertical);
399
+ @include menu-icon-alignment(left);
372
400
  }
373
401
 
374
402
  // Even-width modifier for horizontal orientation
375
403
  &.expanded {
376
404
  @include menu-expand;
405
+ @include menu-icon-alignment(left);
377
406
  }
378
407
 
379
408
  // Simple
@@ -420,31 +449,36 @@ $menu-icons-back-compat: true !default;
420
449
  }
421
450
  }
422
451
 
423
- // Icon Left
424
- &.icon-left {
425
- @include menu-icon-position(left);
426
- }
452
+ // Menu icon position
453
+ // Includes specificity to nested icons with a different position
454
+ &,
455
+ &.nested {
456
+ // Icon Left
457
+ &.icon-left {
458
+ @include menu-icon-position(left);
459
+ }
427
460
 
428
- // Icon Right
429
- &.icon-right {
430
- @include menu-icon-position(right);
431
- }
461
+ // Icon Right
462
+ &.icon-right {
463
+ @include menu-icon-position(right);
464
+ }
432
465
 
433
- // Icon Top
434
- &.icon-top {
435
- @include menu-icon-position(top);
436
- }
466
+ // Icon Top
467
+ &.icon-top {
468
+ @include menu-icon-position(top);
469
+ }
437
470
 
438
- // Icon Bottom
439
- &.icon-bottom {
440
- @include menu-icon-position(bottom);
471
+ // Icon Bottom
472
+ &.icon-bottom {
473
+ @include menu-icon-position(bottom);
474
+ }
441
475
  }
442
476
 
443
477
  // Active state
444
478
  .is-active > a {
445
479
  @include menu-state-active;
446
480
  }
447
-
481
+
448
482
  // Backward Compatibility for active state
449
483
  @if $menu-state-back-compat {
450
484
  .active > a {
@@ -460,6 +494,7 @@ $menu-icons-back-compat: true !default;
460
494
  // Align right
461
495
  &.align-#{$global-right} {
462
496
  @include menu-align(right);
497
+ @include menu-icon-alignment(right);
463
498
 
464
499
  .nested {
465
500
  @include menu-nested($nested-alignment: right);
@@ -482,7 +517,7 @@ $menu-icons-back-compat: true !default;
482
517
  @if $global-flexbox {
483
518
  justify-content: center;
484
519
  }
485
-
520
+
486
521
  @include menu-align(center);
487
522
  }
488
523
  }
@@ -143,7 +143,11 @@ $maincontent-class: 'off-canvas-content' !default;
143
143
  $transition: $offcanvas-transition-length $offcanvas-transition-timing,
144
144
  $fixed: true
145
145
  ) {
146
- @include disable-mouse-outline;
146
+ // Set the off-canvas z-index.
147
+ z-index: $offcanvas-push-zindex;
148
+ transition: transform $transition;
149
+ backface-visibility: hidden;
150
+ background: $background;
147
151
 
148
152
  @if $fixed == true {
149
153
  position: fixed;
@@ -152,19 +156,13 @@ $maincontent-class: 'off-canvas-content' !default;
152
156
  position: absolute;
153
157
  }
154
158
 
155
- // Set the off-canvas z-index.
156
- z-index: $offcanvas-push-zindex;
159
+ @include disable-mouse-outline;
157
160
 
158
161
  // Increase CSS specificity
159
162
  &.is-transition-push {
160
163
  z-index: $offcanvas-push-zindex;
161
164
  }
162
165
 
163
- transition: transform $transition;
164
- backface-visibility: hidden;
165
-
166
- background: $background;
167
-
168
166
  // Hide inactive off-canvas within the content that have the same position
169
167
  &.is-closed {
170
168
  visibility: hidden;
@@ -196,6 +194,7 @@ $maincontent-class: 'off-canvas-content' !default;
196
194
  left: 0;
197
195
  height: 100%;
198
196
  overflow-y: auto;
197
+ -webkit-overflow-scrolling: touch;
199
198
 
200
199
  @each $name, $size in $sizes {
201
200
  @include breakpoint($name) {
@@ -233,6 +232,7 @@ $maincontent-class: 'off-canvas-content' !default;
233
232
  right: 0;
234
233
  height: 100%;
235
234
  overflow-y: auto;
235
+ -webkit-overflow-scrolling: touch;
236
236
 
237
237
  @each $name, $size in $sizes {
238
238
  @include breakpoint($name) {
@@ -270,6 +270,7 @@ $maincontent-class: 'off-canvas-content' !default;
270
270
  left: 0;
271
271
  width: 100%;
272
272
  overflow-x: auto;
273
+ -webkit-overflow-scrolling: touch;
273
274
 
274
275
  @each $name, $size in $sizes {
275
276
  @include breakpoint($name) {
@@ -306,6 +307,7 @@ $maincontent-class: 'off-canvas-content' !default;
306
307
  left: 0;
307
308
  width: 100%;
308
309
  overflow-x: auto;
310
+ -webkit-overflow-scrolling: touch;
309
311
 
310
312
  @each $name, $size in $sizes {
311
313
  @include breakpoint($name) {
@@ -383,10 +385,10 @@ $maincontent-class: 'off-canvas-content' !default;
383
385
 
384
386
  /// Adds styles that reveal an off-canvas panel.
385
387
  @mixin off-canvas-reveal(
386
- $position: left,
387
- $zindex: $offcanvas-reveal-zindex,
388
- $content: $maincontent-class,
389
- $breakpoint: small
388
+ $position: left,
389
+ $zindex: $offcanvas-reveal-zindex,
390
+ $content: $maincontent-class,
391
+ $breakpoint: small
390
392
  ) {
391
393
  transform: none;
392
394
  z-index: $zindex;
@@ -453,10 +455,10 @@ $breakpoint: small
453
455
  @include off-canvas-base;
454
456
 
455
457
  // Force position absolute for nested off-canvas because fixed doesn't work for push transition within the transform scope.
456
- @at-root .#{$maincontent-class} & {
457
- // NOTE: since overlap transition is currently forced if nested, there's no need to force position absolute until nested push transition is supported.
458
- // position: absolute;
459
- }
458
+ // @at-root .#{$maincontent-class} & {
459
+ // // NOTE: since overlap transition is currently forced if nested, there's no need to force position absolute until nested push transition is supported.
460
+ // position: absolute;
461
+ // }
460
462
  }
461
463
 
462
464
  // Off-canvas container with absolute position
@@ -102,11 +102,11 @@ $orbit-control-zindex: 10 !default;
102
102
 
103
103
  /// Adds base styles for the next/previous buttons in an Orbit slider. These styles are shared between the `.orbit-next` and `.orbit-previous` classes in the default CSS.
104
104
  @mixin orbit-control {
105
- @include disable-mouse-outline;
106
- @include vertical-center;
107
105
  z-index: $orbit-control-zindex;
108
106
  padding: $orbit-control-padding;
109
107
  color: $white;
108
+ @include vertical-center;
109
+ @include disable-mouse-outline;
110
110
 
111
111
  &:hover,
112
112
  &:active,
@@ -128,11 +128,11 @@ $orbit-control-zindex: 10 !default;
128
128
 
129
129
  /// Adds styles for a container of Orbit bullets. /// Adds styles for the Orbit previous button. These styles are used on the `.orbit-bullets` class.
130
130
  @mixin orbit-bullets {
131
- @include disable-mouse-outline;
132
131
  position: relative;
133
132
  margin-top: $orbit-bullet-margin-top;
134
133
  margin-bottom: $orbit-bullet-margin-bottom;
135
134
  text-align: center;
135
+ @include disable-mouse-outline;
136
136
 
137
137
  button {
138
138
  width: $orbit-bullet-diameter;
@@ -83,9 +83,9 @@ $pagination-arrow-next: '\00BB' !default;
83
83
  $padding: $pagination-item-padding,
84
84
  $background-hover: $pagination-item-background-hover
85
85
  ) {
86
- @include clearfix;
87
86
  margin-#{$global-left}: 0;
88
87
  margin-bottom: $margin-bottom;
88
+ @include clearfix;
89
89
 
90
90
  // List item
91
91
  li {
@@ -43,7 +43,7 @@
43
43
  @include progress-container;
44
44
 
45
45
  @each $name, $color in $foundation-palette {
46
- &.#{$name} {
46
+ &.#{"" + $name} {
47
47
  .progress-meter {
48
48
  background-color: $color;
49
49
  }
@@ -46,7 +46,7 @@ $responsive-embed-ratios: (
46
46
  .flex-video {
47
47
  @include responsive-embed($ratio: default);
48
48
 
49
- $ratios: map-remove($responsive-embed-ratios,default);
49
+ $ratios: map-remove($responsive-embed-ratios, default);
50
50
 
51
51
  @each $name, $ratio in $ratios {
52
52
  &.#{$name} {
@@ -64,11 +64,11 @@ $reveal-overlay-background: rgba($black, 0.45) !default;
64
64
  display: none;
65
65
  background-color: $background;
66
66
  overflow-y: auto;
67
+ -webkit-overflow-scrolling: touch;
67
68
  }
68
69
 
69
70
  /// Adds base styles for a modal.
70
71
  @mixin reveal-modal-base {
71
- @include disable-mouse-outline;
72
72
  z-index: $reveal-zindex + 1;
73
73
  // Workaround android browser z-index bug
74
74
  backface-visibility: hidden;
@@ -80,6 +80,8 @@ $reveal-overlay-background: rgba($black, 0.45) !default;
80
80
  border-radius: $reveal-radius;
81
81
  background-color: $reveal-background;
82
82
 
83
+ @include disable-mouse-outline;
84
+
83
85
  @include breakpoint(medium) {
84
86
  min-height: 0;
85
87
  }
@@ -137,6 +139,7 @@ $reveal-overlay-background: rgba($black, 0.45) !default;
137
139
 
138
140
  &.zf-has-scroll {
139
141
  overflow-y: scroll;
142
+ -webkit-overflow-scrolling: touch;
140
143
  }
141
144
 
142
145
  body { // sass-lint:disable-line no-qualifying-elements
@@ -151,13 +154,15 @@ $reveal-overlay-background: rgba($black, 0.45) !default;
151
154
 
152
155
  // Modal container
153
156
  .reveal {
154
- @include reveal-modal-base;
155
- @include reveal-modal-width($reveal-width);
156
157
  position: relative;
157
158
  top: 100px;
158
159
  margin-right: auto;
159
160
  margin-left: auto;
160
161
  overflow-y: auto;
162
+ -webkit-overflow-scrolling: touch;
163
+
164
+ @include reveal-modal-base;
165
+ @include reveal-modal-width($reveal-width);
161
166
 
162
167
  // Remove padding
163
168
  &.collapse {
@@ -50,10 +50,9 @@ $slider-transition: all 0.2s ease-in-out !default;
50
50
 
51
51
  /// Adds the general styles for the slider handles.
52
52
  @mixin slider-handle {
53
- @include disable-mouse-outline;
54
- @include vertical-center;
55
53
  left: 0;
56
54
  z-index: 1;
55
+ cursor: grab;
57
56
 
58
57
  display: inline-block;
59
58
  width: $slider-handle-width;
@@ -64,12 +63,16 @@ $slider-transition: all 0.2s ease-in-out !default;
64
63
  transition: $slider-transition;
65
64
  touch-action: manipulation;
66
65
 
66
+ @include vertical-center;
67
+ @include disable-mouse-outline;
68
+
67
69
  &:hover {
68
70
  background-color: scale-color($slider-handle-background, $lightness: -15%);
69
71
  }
70
72
 
71
73
  &.is-dragging {
72
74
  transition: all 0s linear;
75
+ cursor: grabbing;
73
76
  }
74
77
  }
75
78
 
@@ -10,10 +10,18 @@
10
10
  /// @type Color
11
11
  $switch-background: $medium-gray !default;
12
12
 
13
+ /// Background color of a switch on focus.
14
+ /// @type Color
15
+ $switch-background-focus: scale-color($switch-background, $lightness: -10%) !default;
16
+
13
17
  /// Background active color of a switch.
14
18
  /// @type Color
15
19
  $switch-background-active: $primary-color !default;
16
20
 
21
+ /// Background active color of a switch on focus.
22
+ /// @type Color
23
+ $switch-background-active-focus: scale-color($switch-background-active, $lightness: -15%) !default;
24
+
17
25
  /// Height of a switch, with no class applied.
18
26
  /// @type Number
19
27
  $switch-height: 2rem !default;
@@ -56,7 +64,7 @@ $switch-paddle-transition: all 0.25s ease-out !default;
56
64
 
57
65
  /// Opacity of a disabled switch.
58
66
  /// @type Number
59
- $switch-opacity-disabled: .5 !default;
67
+ $switch-opacity-disabled: 0.5 !default;
60
68
 
61
69
  /// Cursor for a disabled switch.
62
70
  /// @type Cursor
@@ -140,6 +148,21 @@ $switch-cursor-disabled: not-allowed !default;
140
148
  }
141
149
  }
142
150
 
151
+
152
+ // Change the visual style when the switch is focused
153
+ input:focus-visible ~ & {
154
+ background: $switch-background-focus;
155
+
156
+ &::after {
157
+ background: $switch-paddle-background;
158
+ }
159
+ }
160
+
161
+ input:checked:focus-visible ~ & {
162
+ background: $switch-background-active-focus;
163
+ }
164
+
165
+
143
166
  // indicate a disabled switch
144
167
  input:disabled ~ & {
145
168
  cursor: $switch-cursor-disabled;
@@ -215,8 +238,8 @@ $switch-cursor-disabled: not-allowed !default;
215
238
  @mixin foundation-switch {
216
239
  // Container class
217
240
  .switch {
218
- height: $switch-height;
219
241
  @include switch-container;
242
+ height: $switch-height;
220
243
  }
221
244
 
222
245
  // <input> element
@@ -8,6 +8,8 @@
8
8
  /// @group table
9
9
  ////
10
10
 
11
+ @use "sass:color";
12
+
11
13
  /// Default color for table background.
12
14
  /// @type Color
13
15
  $table-background: $white !default;
@@ -30,11 +32,11 @@ $table-hover-scale: 2% !default;
30
32
 
31
33
  /// Default color of standard rows on hover.
32
34
  /// @type List
33
- $table-row-hover: darken($table-background, $table-hover-scale) !default;
35
+ $table-row-hover: color.adjust($table-background, $lightness: -$table-hover-scale) !default;
34
36
 
35
37
  /// Default color of striped rows on hover.
36
38
  /// @type List
37
- $table-row-stripe-hover: darken($table-background, $table-color-scale + $table-hover-scale) !default;
39
+ $table-row-stripe-hover: color.adjust($table-background, $lightness: -($table-color-scale + $table-hover-scale)) !default;
38
40
 
39
41
  /// If `true`, tables are striped by default and an .unstriped class is created. If `false`, a .striped class is created.
40
42
  /// @type Boolean
@@ -50,11 +52,11 @@ $table-stripe: even !default;
50
52
 
51
53
  /// Default color for header background.
52
54
  /// @type Color
53
- $table-head-background: smart-scale($table-background, $table-color-scale / 2) !default;
55
+ $table-head-background: smart-scale($table-background, $table-color-scale * 0.5) !default;
54
56
 
55
57
  /// Default color of header rows on hover.
56
58
  /// @type List
57
- $table-head-row-hover: darken($table-head-background, $table-hover-scale) !default;
59
+ $table-head-row-hover: color.adjust($table-head-background, $lightness: -$table-hover-scale) !default;
58
60
 
59
61
  /// Default color for footer background.
60
62
  /// @type Color
@@ -62,7 +64,7 @@ $table-foot-background: smart-scale($table-background, $table-color-scale) !defa
62
64
 
63
65
  /// Default color of footer rows on hover.
64
66
  /// @type List
65
- $table-foot-row-hover: darken($table-foot-background, $table-hover-scale) !default;
67
+ $table-foot-row-hover: color.adjust($table-foot-background, $lightness: -$table-hover-scale) !default;
66
68
 
67
69
  /// Default font color for header.
68
70
  /// @type Color
@@ -101,7 +103,6 @@ $table-stack-breakpoint: medium !default;
101
103
 
102
104
  @mixin -zf-table-unstripe() {
103
105
  tr {
104
- border-bottom: 0;
105
106
  border-bottom: $table-border;
106
107
  background-color: $table-background;
107
108
  }
@@ -166,8 +167,8 @@ $table-stack-breakpoint: medium !default;
166
167
 
167
168
  &.unstriped {
168
169
  tbody {
169
- @include -zf-table-unstripe();
170
170
  background-color: $table-background;
171
+ @include -zf-table-unstripe();
171
172
  }
172
173
  }
173
174
  }
@@ -59,11 +59,11 @@ $tab-content-padding: 1rem !default;
59
59
  $background: $tab-background,
60
60
  $border-color: $tab-content-border
61
61
  ) {
62
- @include clearfix;
63
62
  margin: $margin;
64
63
  border: 1px solid $border-color;
65
64
  background: $background;
66
65
  list-style-type: none;
66
+ @include clearfix;
67
67
  }
68
68
 
69
69
  /// Augments a tab container to have vertical tabs. Use this in conjunction with `tabs-container()`.
@@ -87,12 +87,12 @@ $tab-content-padding: 1rem !default;
87
87
  float: #{$global-left};
88
88
 
89
89
  > a {
90
- @include disable-mouse-outline;
91
90
  display: block;
92
91
  padding: $padding;
93
92
  font-size: $font-size;
94
93
  line-height: 1;
95
94
  color: $color;
95
+ @include disable-mouse-outline;
96
96
 
97
97
  &:hover {
98
98
  background: $background-hover;
@@ -32,6 +32,8 @@ $topbar-unstack-breakpoint: medium !default;
32
32
 
33
33
  /// Adds styles for a top bar container.
34
34
  @mixin top-bar-container {
35
+ padding: $topbar-padding;
36
+
35
37
  @if $global-flexbox {
36
38
  display: flex;
37
39
  flex-wrap: nowrap;
@@ -42,8 +44,6 @@ $topbar-unstack-breakpoint: medium !default;
42
44
  @include clearfix;
43
45
  }
44
46
 
45
- padding: $topbar-padding;
46
-
47
47
  &,
48
48
  ul {
49
49
  background-color: $topbar-background;
@@ -118,13 +118,15 @@ $topbar-unstack-breakpoint: medium !default;
118
118
  }
119
119
 
120
120
  @mixin foundation-top-bar {
121
- // Top bar container
122
121
  .top-bar {
123
122
  @include top-bar-container;
124
-
123
+ }
124
+ .top-bar {
125
125
  // Stack on small screens by default
126
126
  @include top-bar-stacked;
127
-
127
+ }
128
+ // Top bar container
129
+ .top-bar {
128
130
  @include breakpoint($topbar-unstack-breakpoint) {
129
131
  @include top-bar-unstack;
130
132
  }
@@ -9,7 +9,7 @@
9
9
  // Max value is 0.2px under the next breakpoint (0.02 / 16 = 0.00125).
10
10
  // Use a precision under 1px to support browser zoom, but not to low to avoid rounding.
11
11
  // See https://github.com/foundation/foundation-sites/issues/11313
12
- $size: -zf-bp-to-em($size) - .00125;
12
+ $size: -zf-bp-to-em($size) - 0.00125;
13
13
 
14
14
  @include breakpoint($size down) {
15
15
  display: none !important;
@@ -23,7 +23,7 @@
23
23
  $upper-bound-size: -zf-map-next($breakpoints, $size);
24
24
 
25
25
  // more often than not this will be correct, just one time round the loop it won't so set in scope here
26
- $lower-bound: -zf-bp-to-em($lower-bound-size) - .00125;
26
+ $lower-bound: -zf-bp-to-em($lower-bound-size) - 0.00125;
27
27
  // test actual lower-bound-size, if 0 set it to 0em
28
28
  @if strip-unit($lower-bound-size) == 0 {
29
29
  $lower-bound: -zf-bp-to-em($lower-bound-size);
@@ -69,6 +69,9 @@
69
69
  .invisible {
70
70
  visibility: hidden;
71
71
  }
72
+ .visible {
73
+ visibility: visible;
74
+ }
72
75
 
73
76
  // Responsive visibility classes
74
77
  @each $size in $breakpoint-classes {
@@ -132,4 +135,44 @@
132
135
  display: block !important;
133
136
  }
134
137
  }
138
+
139
+ // Dark Mode Visibility
140
+ .show-for-dark-mode {
141
+ display: none;
142
+ }
143
+ .hide-for-dark-mode {
144
+ display: block;
145
+ }
146
+ @media screen and (prefers-color-scheme: dark) {
147
+ .show-for-dark-mode {
148
+ display: block !important;
149
+ }
150
+ .hide-for-dark-mode {
151
+ display: none !important;
152
+ }
153
+ }
154
+
155
+ // IE10+ Visibility
156
+ .show-for-ie {
157
+ display: none;
158
+ }
159
+ @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
160
+ .show-for-ie {
161
+ display: block !important;
162
+ }
163
+ .hide-for-ie {
164
+ display: none !important;
165
+ }
166
+ }
167
+
168
+ // Sticky Visibility
169
+ .show-for-sticky {
170
+ display: none;
171
+ }
172
+ .is-stuck .show-for-sticky {
173
+ display: block;
174
+ }
175
+ .is-stuck .hide-for-sticky {
176
+ display: none;
177
+ }
135
178
  }
@@ -36,7 +36,8 @@ $form-label-line-height: 1.8 !default;
36
36
  $input-border-width: get-border-value($input-border, width);
37
37
 
38
38
  margin: 0 0 $form-spacing;
39
- padding: ($form-spacing / 2 + rem-calc($input-border-width)) 0;
39
+ line-height: $global-lineheight;
40
+ padding: ($form-spacing * 0.5 + rem-calc($input-border-width)) 0;
40
41
  }
41
42
 
42
43
  @mixin foundation-form-label {
@@ -68,7 +68,7 @@ $progress-radius: $global-radius !default;
68
68
  }
69
69
 
70
70
  @each $name, $color in $foundation-palette {
71
- &.#{$name} {
71
+ &.#{"" + $name} {
72
72
  // Internet Explorer sets the fill with color
73
73
  color: $color;
74
74
 
@@ -40,7 +40,7 @@ $slider-radius: $global-radius !default;
40
40
 
41
41
  @mixin foundation-range-input {
42
42
  input[type='range'] { // sass-lint:disable-line no-qualifying-elements
43
- $margin: ($slider-handle-height - $slider-height) / 2;
43
+ $margin: ($slider-handle-height - $slider-height) * 0.5;
44
44
 
45
45
  display: block;
46
46
  width: 100%;
@@ -36,18 +36,19 @@ $select-radius: $global-radius !default;
36
36
  line-height: $input-line-height;
37
37
  color: $input-color;
38
38
 
39
+ @if has-value($input-transition) {
40
+ transition: $input-transition;
41
+ }
42
+
39
43
  @if $select-triangle-color != transparent {
40
- @include background-triangle($select-triangle-color);
41
44
  background-origin: content-box;
42
45
  background-position: $global-right (-$form-spacing) center;
43
46
  background-repeat: no-repeat;
44
47
  background-size: 9px 6px;
45
48
 
46
49
  padding-#{$global-right}: ($form-spacing * 1.5);
47
- }
48
50
 
49
- @if has-value($input-transition) {
50
- transition: $input-transition;
51
+ @include background-triangle($select-triangle-color);
51
52
  }
52
53
 
53
54
  // Focus state