foundation-rails 6.1.1.3 → 6.1.2.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 (63) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/bower.json +2 -2
  4. data/lib/foundation/rails/version.rb +1 -1
  5. data/lib/generators/foundation/templates/_settings.scss +4 -2
  6. data/vendor/assets/js/foundation.abide.js +2 -2
  7. data/vendor/assets/js/foundation.accordion.js +16 -14
  8. data/vendor/assets/js/foundation.accordionMenu.js +20 -23
  9. data/vendor/assets/js/foundation.core.js +6 -8
  10. data/vendor/assets/js/foundation.drilldown.js +4 -4
  11. data/vendor/assets/js/foundation.dropdown.js +5 -3
  12. data/vendor/assets/js/foundation.dropdownMenu.js +8 -9
  13. data/vendor/assets/js/foundation.equalizer.js +6 -6
  14. data/vendor/assets/js/foundation.interchange.js +14 -5
  15. data/vendor/assets/js/foundation.magellan.js +25 -11
  16. data/vendor/assets/js/foundation.offcanvas.js +9 -4
  17. data/vendor/assets/js/foundation.orbit.js +306 -304
  18. data/vendor/assets/js/foundation.responsiveMenu.js +0 -6
  19. data/vendor/assets/js/foundation.reveal.js +63 -27
  20. data/vendor/assets/js/foundation.slider.js +65 -39
  21. data/vendor/assets/js/foundation.tabs.js +6 -7
  22. data/vendor/assets/js/foundation.tooltip.js +3 -3
  23. data/vendor/assets/js/foundation.util.nest.js +2 -3
  24. data/vendor/assets/js/foundation.util.timerAndImageLoader.js +4 -0
  25. data/vendor/assets/js/foundation.util.touch.js +17 -4
  26. data/vendor/assets/js/foundation.util.triggers.js +5 -3
  27. data/vendor/assets/scss/_global.scss +12 -2
  28. data/vendor/assets/scss/components/_accordion.scss +1 -5
  29. data/vendor/assets/scss/components/_button-group.scss +17 -2
  30. data/vendor/assets/scss/components/_button.scss +1 -8
  31. data/vendor/assets/scss/components/_drilldown.scss +4 -4
  32. data/vendor/assets/scss/components/_dropdown-menu.scss +88 -75
  33. data/vendor/assets/scss/components/_dropdown.scss +3 -2
  34. data/vendor/assets/scss/components/_media-object.scss +1 -1
  35. data/vendor/assets/scss/components/_menu.scss +7 -2
  36. data/vendor/assets/scss/components/_off-canvas.scss +0 -4
  37. data/vendor/assets/scss/components/_orbit.scss +1 -1
  38. data/vendor/assets/scss/components/_pagination.scss +6 -2
  39. data/vendor/assets/scss/components/_progress-bar.scss +14 -9
  40. data/vendor/assets/scss/components/_reveal.scss +8 -6
  41. data/vendor/assets/scss/components/_slider.scss +7 -0
  42. data/vendor/assets/scss/components/_table.scss +77 -64
  43. data/vendor/assets/scss/components/_title-bar.scss +4 -0
  44. data/vendor/assets/scss/components/_tooltip.scss +10 -2
  45. data/vendor/assets/scss/components/_top-bar.scss +13 -8
  46. data/vendor/assets/scss/forms/_error.scss +1 -1
  47. data/vendor/assets/scss/forms/_fieldset.scss +1 -0
  48. data/vendor/assets/scss/forms/_forms.scss +8 -9
  49. data/vendor/assets/scss/forms/_input-group.scss +1 -0
  50. data/vendor/assets/scss/forms/_select.scss +3 -1
  51. data/vendor/assets/scss/forms/_text.scss +1 -1
  52. data/vendor/assets/scss/foundation.scss +1 -1
  53. data/vendor/assets/scss/grid/_classes.scss +12 -2
  54. data/vendor/assets/scss/grid/_column.scss +1 -1
  55. data/vendor/assets/scss/grid/_flex-grid.scss +20 -3
  56. data/vendor/assets/scss/grid/_gutter.scss +1 -1
  57. data/vendor/assets/scss/grid/_position.scss +1 -0
  58. data/vendor/assets/scss/grid/_row.scss +1 -0
  59. data/vendor/assets/scss/settings/_settings.scss +4 -2
  60. data/vendor/assets/scss/util/_breakpoint.scss +10 -10
  61. data/vendor/assets/scss/util/_mixins.scss +6 -2
  62. data/vendor/assets/scss/util/_unit.scss +1 -1
  63. metadata +2 -2
@@ -34,7 +34,7 @@ $mediaobject-image-width-stacked: 100% !default;
34
34
  padding-#{$global-right}: $padding;
35
35
  }
36
36
 
37
- &:last-child:not(+ #{&}:first-child) {
37
+ &:last-child:not(:nth-child(2)) {
38
38
  padding-#{$global-left}: $padding;
39
39
  }
40
40
  }
@@ -39,7 +39,7 @@ $menu-expand-max: 6 !default;
39
39
  }
40
40
 
41
41
  // Reset line height to make the height of the overall item easier to calculate
42
- > li:not(.menu-text) > a {
42
+ > li > a {
43
43
  display: block;
44
44
  padding: $menu-item-padding;
45
45
  line-height: 1;
@@ -80,9 +80,14 @@ $menu-expand-max: 6 !default;
80
80
 
81
81
  /// Creates a simple Menu, which has no padding or hover state.
82
82
  @mixin menu-simple {
83
+ li {
84
+ line-height: 1;
85
+ display: inline-block;
86
+ margin-#{$global-right}: get-side($menu-item-padding, $global-right);
87
+ }
88
+
83
89
  a {
84
90
  padding: 0;
85
- margin-#{$global-right}: get-side($menu-item-padding, $global-right);
86
91
  }
87
92
  }
88
93
 
@@ -88,10 +88,6 @@ $maincontent-shadow: 0 0 10px rgba($black, 0.5) !default;
88
88
  background: $offcanvas-exit-background;
89
89
  cursor: pointer;
90
90
  transition: background $offcanvas-transition-length $offcanvas-transition-timing;
91
-
92
- .is-off-canvas-open & {
93
- display: block;
94
- }
95
91
  }
96
92
  }
97
93
 
@@ -67,7 +67,7 @@ $orbit-control-zindex: 10 !default;
67
67
  @mixin orbit-slide {
68
68
  width: 100%;
69
69
  max-height: 100%;
70
-
70
+
71
71
  &.no-motionui {
72
72
  &.is-active {
73
73
  top: 0;
@@ -68,10 +68,14 @@ $pagination-arrows: true !default;
68
68
  li {
69
69
  font-size: $pagination-font-size;
70
70
  margin-#{$global-right}: $pagination-item-spacing;
71
- display: none;
72
71
  border-radius: $pagination-radius;
73
72
 
74
- @if not $pagination-mobile-items {
73
+ @if $pagination-mobile-items {
74
+ display: inline-block;
75
+ }
76
+ @else {
77
+ display: none;
78
+
75
79
  &:last-child,
76
80
  &:first-child {
77
81
  display: inline-block;
@@ -41,20 +41,25 @@ $progress-radius: $global-radius !default;
41
41
  width: 0%;
42
42
  height: 100%;
43
43
  background-color: $progress-meter-background;
44
- border-radius: $global-radius;
44
+
45
+ @if has-value($progress-radius) {
46
+ border-radius: $global-radius;
47
+ }
45
48
  }
46
49
 
47
50
  /// Adds styles for text in the progress meter.
48
51
  @mixin progress-meter-text {
52
+ @include absolute-center;
49
53
  position: absolute;
50
- top: 50%;
51
- #{$global-left}: 50%;
52
- transform: translate(-50%, -50%);
53
54
  margin: 0;
54
55
  font-size: 0.75rem;
55
56
  font-weight: bold;
56
57
  color: $white;
57
58
  white-space: nowrap;
59
+
60
+ @if has-value($progress-radius) {
61
+ border-radius: $progress-radius;
62
+ }
58
63
  }
59
64
 
60
65
  @mixin foundation-progress-bar {
@@ -71,13 +76,13 @@ $progress-radius: $global-radius !default;
71
76
  }
72
77
  }
73
78
 
74
- // Progress bar meter
79
+ // Inner meter
75
80
  .progress-meter {
76
81
  @include progress-meter;
82
+ }
77
83
 
78
- // Progress bar meter text
79
- .progress-meter-text {
80
- @include progress-meter-text;
81
- }
84
+ // Inner meter text
85
+ .progress-meter-text {
86
+ @include progress-meter-text;
82
87
  }
83
88
  }
@@ -63,7 +63,7 @@ $reveal-overlay-background: rgba($black, 0.45) !default;
63
63
  z-index: $reveal-zindex + 1;
64
64
  padding: $reveal-padding;
65
65
  border: $reveal-border;
66
- margin: 100px auto 0;
66
+ margin: $reveal-offset auto 0;
67
67
  background-color: $reveal-background;
68
68
  border-radius: $reveal-radius;
69
69
 
@@ -112,6 +112,8 @@ $reveal-overlay-background: rgba($black, 0.45) !default;
112
112
  }
113
113
 
114
114
  @mixin foundation-reveal {
115
+ // [TODO] Is this necessary?
116
+ // scss-lint:disable QualifyingElement
115
117
  body.is-reveal-open {
116
118
  overflow: hidden;
117
119
  }
@@ -128,11 +130,6 @@ $reveal-overlay-background: rgba($black, 0.45) !default;
128
130
  position: absolute;
129
131
  overflow-y: auto;
130
132
 
131
- // Remove padding
132
- &.collapse {
133
- padding: 0;
134
- }
135
-
136
133
  // Placeholder selector for medium-and-up modals
137
134
  // Prevents duplicate CSS when defining multiple Reveal sizes
138
135
  @include breakpoint(medium) {
@@ -143,6 +140,11 @@ $reveal-overlay-background: rgba($black, 0.45) !default;
143
140
  }
144
141
  }
145
142
 
143
+ // Remove padding
144
+ &.collapse {
145
+ padding: 0;
146
+ }
147
+
146
148
  // Sizing classes
147
149
  &.tiny { @include reveal-modal-width(30%); }
148
150
  &.small { @include reveal-modal-width(50%); }
@@ -155,4 +155,11 @@ $slider-transition: all 0.2s ease-in-out !default;
155
155
  .slider.vertical {
156
156
  @include slider-vertical;
157
157
  }
158
+
159
+ // RTL support
160
+ @if $global-text-direction == rtl {
161
+ .slider:not(.vertical) {
162
+ transform: scale(-1, 1);
163
+ }
164
+ }
158
165
  }
@@ -8,120 +8,133 @@
8
8
  /// @group table
9
9
  ////
10
10
 
11
- /// Defualt color for table background.
11
+ /// Default color for table background.
12
12
  /// @type Color
13
13
  $table-background: $white !default;
14
14
 
15
- /// Defualt scale for darkening the striped table rows and the table border.
15
+ /// Default scale for darkening the striped table rows and the table border.
16
16
  /// @type Number
17
17
  $table-color-scale: 5% !default;
18
18
 
19
- /// Defualt style for table border.
19
+ /// Default style for table border.
20
20
  /// @type List
21
21
  $table-border: 1px solid smart-scale($table-background, $table-color-scale) !default;
22
22
 
23
- /// Defualt padding for table.
23
+ /// Default padding for table.
24
24
  /// @type Number
25
25
  $table-padding: rem-calc(8 10 10) !default;
26
26
 
27
- /// Defualt scale for darkening the table rows on hover.
27
+ /// Default scale for darkening the table rows on hover.
28
28
  /// @type Number
29
29
  $table-hover-scale: 2% !default;
30
30
 
31
- /// Defualt color of standard rows on hover.
31
+ /// Default color of standard rows on hover.
32
32
  /// @type List
33
33
  $table-row-hover: darken($table-background, $table-hover-scale) !default;
34
34
 
35
- /// Defualt color of striped rows on hover.
35
+ /// Default color of striped rows on hover.
36
36
  /// @type List
37
37
  $table-row-stripe-hover: darken($table-background, $table-color-scale + $table-hover-scale) !default;
38
38
 
39
- /// Defualt background color for striped rows.
39
+ /// Default background color for striped rows.
40
40
  /// @type Color
41
41
  $table-striped-background: smart-scale($table-background, $table-color-scale) !default;
42
42
 
43
- /// Defualt 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.
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
44
  /// @type Keyoword
45
45
  $table-stripe: even !default;
46
46
 
47
- /// Defualt color for header background.
47
+ /// Default color for header background.
48
48
  /// @type Color
49
49
  $table-head-background: smart-scale($table-background, $table-color-scale / 2) !default;
50
50
 
51
- /// Defualt color for footer background.
51
+ /// Default color for footer background.
52
52
  /// @type Color
53
53
  $table-foot-background: smart-scale($table-background, $table-color-scale) !default;
54
54
 
55
- /// Defualt font color for header.
55
+ /// Default font color for header.
56
56
  /// @type Color
57
57
  $table-head-font-color: $body-font-color !default;
58
58
 
59
- /// Defualt value for showing the header when using stacked tables.
59
+ /// Default value for showing the header when using stacked tables.
60
60
  /// @type Boolean
61
61
  $show-header-for-stacked: false !default;
62
62
 
63
- /// Adds the general styles for tables.
64
- /// @param {Keyword} $stripe [$table-stripe] - Uses kewords even, odd, or none to darken rows of the table. The defualt value is even.
65
- @mixin table($stripe: $table-stripe) {
66
- margin-bottom: $global-margin;
67
- border-radius: $global-radius;
63
+ @mixin -zf-table-children-styles($stripe: $table-stripe) {
64
+ thead,
65
+ tbody,
66
+ tfoot {
67
+ border: $table-border;
68
+ background-color: $table-background;
69
+ }
70
+
71
+ // Caption
72
+ caption {
73
+ font-weight: $global-weight-bold;
74
+ padding: $table-padding;
75
+ }
68
76
 
69
- @at-root {
70
- thead,
71
- tbody,
72
- tfoot {
73
- border: $table-border;
74
- background-color: $table-background;
77
+ // Table head and foot
78
+ thead,
79
+ tfoot {
80
+ background: $table-head-background;
81
+ color: $table-head-font-color;
82
+
83
+ // Rows within head and foot
84
+ tr {
85
+ background: transparent;
75
86
  }
76
87
 
77
- // Caption
78
- caption {
79
- font-weight: $global-weight-bold;
88
+ // Cells within head and foot
89
+ th,
90
+ td {
80
91
  padding: $table-padding;
92
+ font-weight: $global-weight-bold;
93
+ text-align: #{$global-left};
81
94
  }
95
+ }
82
96
 
83
- // Table head and foot
84
- thead,
85
- tfoot {
86
- background: $table-head-background;
87
- color: $table-head-font-color;
88
-
89
- // Rows within head and foot
90
- tr {
91
- background: transparent;
97
+ // Table rows
98
+ tbody {
99
+ tr {
100
+ // If stripe is set to even, darken the even rows.
101
+ @if $stripe == even {
102
+ &:nth-child(even) {
103
+ background-color: $table-striped-background;
104
+ }
92
105
  }
93
106
 
94
- // Cells within head and foot
95
- th,
96
- td {
97
- padding: $table-padding;
98
- font-weight: $global-weight-bold;
99
- text-align: #{$global-left};
107
+ // If stripe is set to odd, darken the odd rows.
108
+ @else if $stripe == odd {
109
+ &:nth-child(odd) {
110
+ background-color: $table-striped-background;
111
+ }
100
112
  }
101
113
  }
102
114
 
103
- // Table rows
104
- tbody {
105
- tr {
106
- // If stripe is set to even, darken the even rows.
107
- @if $stripe == even {
108
- &:nth-child(even) {
109
- background-color: $table-striped-background;
110
- }
111
- }
115
+ th,
116
+ td {
117
+ padding: $table-padding;
118
+ }
119
+ }
120
+ }
112
121
 
113
- // If stripe is set to odd, darken the odd rows.
114
- @else if $stripe == odd {
115
- &:nth-child(odd) {
116
- background-color: $table-striped-background;
117
- }
118
- }
119
- }
122
+ /// Adds the general styles for tables.
123
+ /// @param {Keyword} $stripe [$table-stripe] - Uses keywords even, odd, or none to darken rows of the table. The default value is even.
124
+ @mixin table(
125
+ $stripe: $table-stripe,
126
+ $nest: false
127
+ ) {
128
+ width: 100%;
129
+ margin-bottom: $global-margin;
130
+ border-radius: $global-radius;
120
131
 
121
- th,
122
- td {
123
- padding: $table-padding;
124
- }
132
+ @if $nest {
133
+ @include -zf-table-children-styles($stripe);
134
+ }
135
+ @else {
136
+ @at-root {
137
+ @include -zf-table-children-styles($stripe);
125
138
  }
126
139
  }
127
140
  }
@@ -192,9 +205,9 @@ $show-header-for-stacked: false !default;
192
205
  }
193
206
  }
194
207
 
195
- @mixin foundation-table {
208
+ @mixin foundation-table($nest: false) {
196
209
  table {
197
- @include table;
210
+ @include table($nest: $nest);
198
211
  }
199
212
 
200
213
  table.stack {
@@ -65,4 +65,8 @@ $titlebar-icon-spacing: 0.25rem !default;
65
65
  .menu-icon {
66
66
  @include hamburger($color: $titlebar-icon-color, $color-hover: $titlebar-icon-color-hover);
67
67
  }
68
+
69
+ .menu-icon.dark {
70
+ @include hamburger;
71
+ }
68
72
  }
@@ -6,6 +6,14 @@
6
6
  /// @group tooltip
7
7
  ////
8
8
 
9
+ /// Default font weight of the defined term.
10
+ /// @type Keyword | Number
11
+ $has-tip-font-weight: $global-weight-bold !default;
12
+
13
+ /// Default border bottom of the defined term.
14
+ /// @type List
15
+ $has-tip-border-bottom: dotted 1px $dark-gray !default;
16
+
9
17
  /// Default color of the tooltip background.
10
18
  /// @type Color
11
19
  $tooltip-background-color: $black !default;
@@ -39,8 +47,8 @@ $tooltip-pip-offset: 1.25rem !default;
39
47
  $tooltip-radius: $global-radius !default;
40
48
 
41
49
  @mixin has-tip {
42
- border-bottom: dotted 1px $dark-gray;
43
- font-weight: bold;
50
+ border-bottom: $has-tip-border-bottom;
51
+ font-weight: $has-tip-font-weight;
44
52
  position: relative;
45
53
  display: inline-block;
46
54
  cursor: help;
@@ -14,9 +14,9 @@ $topbar-padding: 0.5rem !default;
14
14
  /// @type Color
15
15
  $topbar-background: $light-gray !default;
16
16
 
17
- /// Color for links inside a top bar menu.
18
- /// @type Color
19
- $topbar-link-color: $primary-color !default;
17
+ /// Spacing for the top bar title.
18
+ /// @type Number
19
+ $topbar-title-spacing: 1rem !default;
20
20
 
21
21
  /// Width of `<input>` elements inside the top bar.
22
22
  /// @type Number
@@ -32,15 +32,12 @@ $topbar-input-width: 200px !default;
32
32
  background-color: $topbar-background;
33
33
  }
34
34
 
35
- a {
36
- color: $topbar-link-color;
37
- }
38
-
39
35
  input {
40
36
  width: $topbar-input-width;
41
37
  margin-#{$global-right}: 1rem;
42
38
  }
43
39
 
40
+ // scss-lint:disable QualifyingElement
44
41
  input.button {
45
42
  width: auto;
46
43
  }
@@ -49,6 +46,10 @@ $topbar-input-width: 200px !default;
49
46
  /// makes sections stacked
50
47
  @mixin top-bar-stacked {
51
48
  // Sub-sections
49
+ .top-bar-title {
50
+ width: 100%;
51
+ }
52
+
52
53
  .top-bar-right {
53
54
  width: 100%;
54
55
  }
@@ -79,10 +80,14 @@ $topbar-input-width: 200px !default;
79
80
  }
80
81
 
81
82
  // Sub-sections
83
+ .top-bar-title {
84
+ float: left;
85
+ margin-right: $topbar-title-spacing;
86
+ }
82
87
  .top-bar-left {
83
88
  float: left;
84
89
  }
85
-
90
+
86
91
  .top-bar-right {
87
92
  float: right;
88
93
  }