foundation-scss 6.3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. checksums.yaml +7 -0
  2. data/_vendor/normalize-scss/sass/_normalize.scss +3 -0
  3. data/_vendor/normalize-scss/sass/normalize/_import-now.scss +11 -0
  4. data/_vendor/normalize-scss/sass/normalize/_normalize-mixin.scss +676 -0
  5. data/_vendor/normalize-scss/sass/normalize/_variables.scss +36 -0
  6. data/_vendor/normalize-scss/sass/normalize/_vertical-rhythm.scss +61 -0
  7. data/_vendor/sassy-lists/stylesheets/functions/_purge.scss +38 -0
  8. data/_vendor/sassy-lists/stylesheets/functions/_remove.scss +31 -0
  9. data/_vendor/sassy-lists/stylesheets/functions/_replace.scss +46 -0
  10. data/_vendor/sassy-lists/stylesheets/functions/_to-list.scss +27 -0
  11. data/_vendor/sassy-lists/stylesheets/helpers/_missing-dependencies.scss +25 -0
  12. data/_vendor/sassy-lists/stylesheets/helpers/_true.scss +13 -0
  13. data/foundation-scss.gemspec +9 -0
  14. data/lib/foundation/scss/in/sass_path.rb +6 -0
  15. data/scss/_global.scss +219 -0
  16. data/scss/components/_accordion-menu.scss +36 -0
  17. data/scss/components/_accordion.scss +150 -0
  18. data/scss/components/_badge.scss +63 -0
  19. data/scss/components/_breadcrumbs.scss +100 -0
  20. data/scss/components/_button-group.scss +253 -0
  21. data/scss/components/_button.scss +332 -0
  22. data/scss/components/_callout.scss +106 -0
  23. data/scss/components/_card.scss +121 -0
  24. data/scss/components/_close-button.scss +102 -0
  25. data/scss/components/_drilldown.scss +93 -0
  26. data/scss/components/_dropdown-menu.scss +226 -0
  27. data/scss/components/_dropdown.scss +72 -0
  28. data/scss/components/_flex-video.scss +1 -0
  29. data/scss/components/_flex.scss +34 -0
  30. data/scss/components/_float.scss +27 -0
  31. data/scss/components/_label.scss +64 -0
  32. data/scss/components/_media-object.scss +114 -0
  33. data/scss/components/_menu-icon.scss +9 -0
  34. data/scss/components/_menu.scss +376 -0
  35. data/scss/components/_off-canvas.scss +329 -0
  36. data/scss/components/_orbit.scss +196 -0
  37. data/scss/components/_pagination.scss +193 -0
  38. data/scss/components/_progress-bar.scss +64 -0
  39. data/scss/components/_responsive-embed.scss +70 -0
  40. data/scss/components/_reveal.scss +178 -0
  41. data/scss/components/_slider.scss +138 -0
  42. data/scss/components/_sticky.scss +38 -0
  43. data/scss/components/_switch.scss +247 -0
  44. data/scss/components/_table.scss +329 -0
  45. data/scss/components/_tabs.scss +196 -0
  46. data/scss/components/_thumbnail.scss +67 -0
  47. data/scss/components/_title-bar.scss +84 -0
  48. data/scss/components/_tooltip.scss +107 -0
  49. data/scss/components/_top-bar.scss +173 -0
  50. data/scss/components/_visibility.scss +132 -0
  51. data/scss/forms/_checkbox.scss +41 -0
  52. data/scss/forms/_error.scss +88 -0
  53. data/scss/forms/_fieldset.scss +54 -0
  54. data/scss/forms/_forms.scss +34 -0
  55. data/scss/forms/_help-text.scss +30 -0
  56. data/scss/forms/_input-group.scss +135 -0
  57. data/scss/forms/_label.scss +50 -0
  58. data/scss/forms/_meter.scss +110 -0
  59. data/scss/forms/_progress.scss +94 -0
  60. data/scss/forms/_range.scss +149 -0
  61. data/scss/forms/_select.scss +85 -0
  62. data/scss/forms/_text.scss +170 -0
  63. data/scss/foundation.scss +118 -0
  64. data/scss/grid/_classes.scss +176 -0
  65. data/scss/grid/_column.scss +112 -0
  66. data/scss/grid/_flex-grid.scss +312 -0
  67. data/scss/grid/_grid.scss +48 -0
  68. data/scss/grid/_gutter.scss +82 -0
  69. data/scss/grid/_layout.scss +76 -0
  70. data/scss/grid/_position.scss +76 -0
  71. data/scss/grid/_row.scss +99 -0
  72. data/scss/grid/_size.scss +24 -0
  73. data/scss/settings/_settings.scss +620 -0
  74. data/scss/typography/_alignment.scss +22 -0
  75. data/scss/typography/_base.scss +509 -0
  76. data/scss/typography/_helpers.scss +78 -0
  77. data/scss/typography/_print.scss +86 -0
  78. data/scss/typography/_typography.scss +26 -0
  79. data/scss/util/_breakpoint.scss +281 -0
  80. data/scss/util/_color.scss +126 -0
  81. data/scss/util/_direction.scss +31 -0
  82. data/scss/util/_flex.scss +85 -0
  83. data/scss/util/_math.scss +72 -0
  84. data/scss/util/_mixins.scss +276 -0
  85. data/scss/util/_selector.scss +41 -0
  86. data/scss/util/_typography.scss +26 -0
  87. data/scss/util/_unit.scss +152 -0
  88. data/scss/util/_util.scss +14 -0
  89. data/scss/util/_value.scss +160 -0
  90. metadata +144 -0
@@ -0,0 +1,138 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ // [TODO] Check how plugin confirms disabled or vertical status
6
+ // [TODO] Check if transition: all; is necessary
7
+
8
+ ////
9
+ /// @group slider
10
+ ////
11
+
12
+ /// Default slider width of a vertical slider. (Doesn't apply to the native slider.)
13
+ /// @type Number
14
+ $slider-width-vertical: 0.5rem !default;
15
+
16
+ /// Transition properties to apply to the slider handle and fill. (Doesn't apply to the native slider.)
17
+ /// @type Transition
18
+ $slider-transition: all 0.2s ease-in-out !default;
19
+
20
+ /// Adds the general styles for sliders.
21
+ @mixin slider-container {
22
+ position: relative;
23
+ height: $slider-height;
24
+ margin-top: 1.25rem;
25
+ margin-bottom: 2.25rem;
26
+
27
+ background-color: $slider-background;
28
+ cursor: pointer;
29
+ user-select: none;
30
+ touch-action: none;
31
+ }
32
+
33
+ /// Adds the general styles for active fill for sliders.
34
+ @mixin slider-fill {
35
+ position: absolute;
36
+ top: 0;
37
+ left: 0;
38
+
39
+ display: inline-block;
40
+ max-width: 100%;
41
+ height: $slider-height;
42
+
43
+ background-color: $slider-fill-background;
44
+ transition: $slider-transition;
45
+
46
+ &.is-dragging {
47
+ transition: all 0s linear;
48
+ }
49
+ }
50
+
51
+ /// Adds the general styles for the slider handles.
52
+ @mixin slider-handle {
53
+ @include disable-mouse-outline;
54
+ @include vertical-center;
55
+ position: absolute;
56
+ left: 0;
57
+ z-index: 1;
58
+
59
+ display: inline-block;
60
+ width: $slider-handle-width;
61
+ height: $slider-handle-height;
62
+
63
+ border-radius: $slider-radius;
64
+ background-color: $slider-handle-background;
65
+ transition: $slider-transition;
66
+ touch-action: manipulation;
67
+
68
+ &:hover {
69
+ background-color: scale-color($slider-handle-background, $lightness: -15%);
70
+ }
71
+
72
+ &.is-dragging {
73
+ transition: all 0s linear;
74
+ }
75
+ }
76
+
77
+ @mixin slider-disabled {
78
+ opacity: $slider-opacity-disabled;
79
+ cursor: not-allowed;
80
+ }
81
+
82
+ @mixin slider-vertical {
83
+ display: inline-block;
84
+ width: $slider-width-vertical;
85
+ height: 12.5rem;
86
+ margin: 0 1.25rem;
87
+ transform: scale(1, -1);
88
+
89
+ .slider-fill {
90
+ top: 0;
91
+ width: $slider-width-vertical;
92
+ max-height: 100%;
93
+ }
94
+
95
+ .slider-handle {
96
+ position: absolute;
97
+ top: 0;
98
+ left: 50%;
99
+ width: $slider-handle-height;
100
+ height: $slider-handle-width;
101
+ transform: translateX(-50%);
102
+ }
103
+ }
104
+
105
+ @mixin foundation-slider {
106
+ // Container
107
+ .slider {
108
+ @include slider-container;
109
+ }
110
+
111
+ // Fill area
112
+ .slider-fill {
113
+ @include slider-fill;
114
+ }
115
+
116
+ // Draggable handle
117
+ .slider-handle {
118
+ @include slider-handle;
119
+ }
120
+
121
+ // Disabled state
122
+ .slider.disabled,
123
+ .slider[disabled] {
124
+ @include slider-disabled;
125
+ }
126
+
127
+ // Vertical slider
128
+ .slider.vertical {
129
+ @include slider-vertical;
130
+ }
131
+
132
+ // RTL support
133
+ @if $global-text-direction == rtl {
134
+ .slider:not(.vertical) {
135
+ transform: scale(-1, 1);
136
+ }
137
+ }
138
+ }
@@ -0,0 +1,38 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ @mixin foundation-sticky {
6
+ .sticky-container {
7
+ position: relative;
8
+ }
9
+
10
+ .sticky {
11
+ position: relative;
12
+ z-index: 0;
13
+ transform: translate3d(0, 0, 0);
14
+ }
15
+
16
+ .sticky.is-stuck {
17
+ position: fixed;
18
+ z-index: 5;
19
+
20
+ &.is-at-top {
21
+ top: 0;
22
+ }
23
+
24
+ &.is-at-bottom {
25
+ bottom: 0;
26
+ }
27
+ }
28
+
29
+ .sticky.is-anchored {
30
+ position: relative;
31
+ right: auto;
32
+ left: auto;
33
+
34
+ &.is-at-bottom {
35
+ bottom: 0;
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,247 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group switch
7
+ ////
8
+
9
+ /// Background color of a switch.
10
+ /// @type Color
11
+ $switch-background: $medium-gray !default;
12
+
13
+ /// Background active color of a switch.
14
+ /// @type Color
15
+ $switch-background-active: $primary-color !default;
16
+
17
+ /// Height of a switch, with no class applied.
18
+ /// @type Number
19
+ $switch-height: 2rem !default;
20
+
21
+ /// Height of a switch with .tiny class.
22
+ /// @type Number
23
+ $switch-height-tiny: 1.5rem !default;
24
+
25
+ /// Height of a switch with .small class.
26
+ /// @type Number
27
+ $switch-height-small: 1.75rem !default;
28
+
29
+ /// Height of a switch with .large class.
30
+ /// @type Number
31
+ $switch-height-large: 2.5rem !default;
32
+
33
+ /// Border radius of the switch
34
+ /// @type Number
35
+ $switch-radius: $global-radius !default;
36
+
37
+ /// border around a modal.
38
+ /// @type Number
39
+ $switch-margin: $global-margin !default;
40
+
41
+ /// Background color for the switch container and paddle.
42
+ /// @type Color
43
+ $switch-paddle-background: $white !default;
44
+
45
+ /// Spacing between a switch paddle and the edge of the body.
46
+ /// @type Number
47
+ $switch-paddle-offset: 0.25rem !default;
48
+
49
+ /// border radius of the switch paddle
50
+ /// @type Number
51
+ $switch-paddle-radius: $global-radius !default;
52
+
53
+ /// switch transition.
54
+ /// @type Number
55
+ $switch-paddle-transition: all 0.25s ease-out !default;
56
+
57
+ // make them variables
58
+ // ask about accessibility on label
59
+ // change class name for text
60
+
61
+ /// Adds styles for a switch container. Apply this to a container class.
62
+ @mixin switch-container {
63
+ position: relative;
64
+ margin-bottom: $switch-margin;
65
+ outline: 0;
66
+
67
+ // These properties cascade down to the switch text
68
+ font-size: rem-calc(14);
69
+ font-weight: bold;
70
+ color: $white;
71
+
72
+ user-select: none;
73
+ }
74
+
75
+ /// Adds styles for a switch input. Apply this to an `<input>` within a switch.
76
+ @mixin switch-input {
77
+ position: absolute;
78
+ margin-bottom: 0;
79
+ opacity: 0;
80
+ }
81
+
82
+ /// Adds styles for the background and paddle of a switch. Apply this to a `<label>` within a switch.
83
+ @mixin switch-paddle {
84
+ $switch-width: $switch-height * 2;
85
+ $paddle-height: $switch-height - ($switch-paddle-offset * 2);
86
+ $paddle-width: $switch-height - ($switch-paddle-offset * 2);
87
+ $paddle-active-offest: $switch-width - $paddle-width - $switch-paddle-offset;
88
+
89
+ position: relative;
90
+ display: block;
91
+ width: $switch-width;
92
+ height: $switch-height;
93
+
94
+ border-radius: $switch-radius;
95
+ background: $switch-background;
96
+ transition: $switch-paddle-transition;
97
+
98
+ // Resetting these <label> presets so type styles cascade down
99
+ font-weight: inherit;
100
+ color: inherit;
101
+
102
+ cursor: pointer;
103
+
104
+ // Needed to override specificity
105
+ input + & {
106
+ margin: 0;
107
+ }
108
+
109
+ // The paddle itself
110
+ &::after {
111
+ position: absolute;
112
+ top: $switch-paddle-offset;
113
+ #{$global-left}: $switch-paddle-offset;
114
+
115
+ display: block;
116
+ width: $paddle-width;
117
+ height: $paddle-height;
118
+
119
+ transform: translate3d(0, 0, 0);
120
+ border-radius: $switch-paddle-radius;
121
+ background: $switch-paddle-background;
122
+ transition: $switch-paddle-transition;
123
+ content: '';
124
+ }
125
+
126
+ // Change the visual style when the switch is active
127
+ input:checked ~ & {
128
+ background: $switch-background-active;
129
+
130
+ &::after {
131
+ #{$global-left}: $paddle-active-offest;
132
+ }
133
+ }
134
+
135
+ input:focus ~ & {
136
+ @include disable-mouse-outline;
137
+ }
138
+ }
139
+
140
+ /// Adds base styles for active/inactive text inside a switch. Apply this to text elements inside the switch `<label>`.
141
+ @mixin switch-text {
142
+ position: absolute;
143
+ top: 50%;
144
+ transform: translateY(-50%);
145
+ }
146
+
147
+ /// Adds styles for the active state text within a switch.
148
+ @mixin switch-text-active {
149
+ #{$global-left}: 8%;
150
+ display: none;
151
+
152
+ input:checked + label > & {
153
+ display: block;
154
+ }
155
+ }
156
+
157
+ /// Adds styles for the inactive state text within a switch.
158
+ @mixin switch-text-inactive {
159
+ #{$global-right}: 15%;
160
+
161
+ input:checked + label > & {
162
+ display: none;
163
+ }
164
+ }
165
+
166
+ /// Changes the size of a switch by modifying the size of the body and paddle. Apply this to a switch container.
167
+ /// @param {Number} $font-size [1rem] - Font size of label text within the switch.
168
+ /// @param {Number} $switch-height [2rem] - Height of the switch body.
169
+ /// @param {Number} $paddle-offset [0.25rem] - Spacing between the switch paddle and the edge of the switch body.
170
+ @mixin switch-size(
171
+ $font-size: 1rem,
172
+ $switch-height: 2rem,
173
+ $paddle-offset: 0.25rem
174
+ ) {
175
+
176
+ $switch-width: $switch-height * 2;
177
+ $paddle-width: $switch-height - ($paddle-offset * 2);
178
+ $paddle-height: $switch-height - ($paddle-offset * 2);
179
+ $paddle-active-offest: $switch-width - $paddle-width - $paddle-offset;
180
+
181
+ height: $switch-height;
182
+
183
+ .switch-paddle {
184
+ width: $switch-width;
185
+ height: $switch-height;
186
+ font-size: $font-size;
187
+ }
188
+
189
+ .switch-paddle::after {
190
+ top: $paddle-offset;
191
+ #{$global-left}: $paddle-offset;
192
+ width: $paddle-width;
193
+ height: $paddle-height;
194
+ }
195
+
196
+ input:checked ~ .switch-paddle::after {
197
+ #{$global-left}: $paddle-active-offest;
198
+ }
199
+ }
200
+
201
+ @mixin foundation-switch {
202
+ // Container class
203
+ .switch {
204
+ height: $switch-height;
205
+ @include switch-container;
206
+ }
207
+
208
+ // <input> element
209
+ .switch-input {
210
+ @include switch-input;
211
+ }
212
+
213
+ // <label> element
214
+ .switch-paddle {
215
+ @include switch-paddle;
216
+ }
217
+
218
+ // Base label text styles
219
+ %switch-text {
220
+ @include switch-text;
221
+ }
222
+
223
+ // Active label text styles
224
+ .switch-active {
225
+ @extend %switch-text;
226
+ @include switch-text-active;
227
+ }
228
+
229
+ // Inactive label text styles
230
+ .switch-inactive {
231
+ @extend %switch-text;
232
+ @include switch-text-inactive;
233
+ }
234
+
235
+ // Switch sizes
236
+ .switch.tiny {
237
+ @include switch-size(rem-calc(10), $switch-height-tiny, $switch-paddle-offset);
238
+ }
239
+
240
+ .switch.small {
241
+ @include switch-size(rem-calc(12), $switch-height-small, $switch-paddle-offset);
242
+ }
243
+
244
+ .switch.large {
245
+ @include switch-size(rem-calc(16), $switch-height-large, $switch-paddle-offset);
246
+ }
247
+ }
@@ -0,0 +1,329 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ // sass-lint:disable force-element-nesting, no-qualifying-elements
6
+
7
+ ////
8
+ /// @group table
9
+ ////
10
+
11
+ /// Default color for table background.
12
+ /// @type Color
13
+ $table-background: $white !default;
14
+
15
+ /// Default scale for darkening the striped table rows and the table border.
16
+ /// @type Number
17
+ $table-color-scale: 5% !default;
18
+
19
+ /// Default style for table border.
20
+ /// @type List
21
+ $table-border: 1px solid smart-scale($table-background, $table-color-scale) !default;
22
+
23
+ /// Default padding for table.
24
+ /// @type Number
25
+ $table-padding: rem-calc(8 10 10) !default;
26
+
27
+ /// Default scale for darkening the table rows on hover.
28
+ /// @type Number
29
+ $table-hover-scale: 2% !default;
30
+
31
+ /// Default color of standard rows on hover.
32
+ /// @type List
33
+ $table-row-hover: darken($table-background, $table-hover-scale) !default;
34
+
35
+ /// Default color of striped rows on hover.
36
+ /// @type List
37
+ $table-row-stripe-hover: darken($table-background, $table-color-scale + $table-hover-scale) !default;
38
+
39
+ /// If `true`, tables are striped by default and an .unstriped class is created. If `false`, a .striped class is created.
40
+ /// @type Boolean
41
+ $table-is-striped: true !default;
42
+
43
+ /// Default background color for striped rows.
44
+ /// @type Color
45
+ $table-striped-background: smart-scale($table-background, $table-color-scale) !default;
46
+
47
+ /// 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.
48
+ /// @type Keyword
49
+ $table-stripe: even !default;
50
+
51
+ /// Default color for header background.
52
+ /// @type Color
53
+ $table-head-background: smart-scale($table-background, $table-color-scale / 2) !default;
54
+
55
+ /// Default color of header rows on hover.
56
+ /// @type List
57
+ $table-head-row-hover: darken($table-head-background, $table-hover-scale) !default;
58
+
59
+ /// Default color for footer background.
60
+ /// @type Color
61
+ $table-foot-background: smart-scale($table-background, $table-color-scale) !default;
62
+
63
+ /// Default color of footer rows on hover.
64
+ /// @type List
65
+ $table-foot-row-hover: darken($table-foot-background, $table-hover-scale) !default;
66
+
67
+ /// Default font color for header.
68
+ /// @type Color
69
+ $table-head-font-color: $body-font-color !default;
70
+
71
+ /// Default font color for footer.
72
+ /// @type Color
73
+ $table-foot-font-color: $body-font-color !default;
74
+
75
+ /// Default value for showing the header when using stacked tables.
76
+ /// @type Boolean
77
+ $show-header-for-stacked: false !default;
78
+
79
+ @mixin -zf-table-stripe($stripe: $table-stripe) {
80
+ tr {
81
+ // If stripe is set to even, darken the even rows.
82
+ @if $stripe == even {
83
+ &:nth-child(even) {
84
+ border-bottom: 0;
85
+ background-color: $table-striped-background;
86
+ }
87
+ }
88
+
89
+ // If stripe is set to odd, darken the odd rows.
90
+ @else if $stripe == odd {
91
+ &:nth-child(odd) {
92
+ background-color: $table-striped-background;
93
+ }
94
+ }
95
+ }
96
+ }
97
+
98
+ @mixin -zf-table-unstripe() {
99
+ tr {
100
+ border-bottom: 0;
101
+ border-bottom: $table-border;
102
+ background-color: $table-background;
103
+ }
104
+ }
105
+
106
+ @mixin -zf-table-children-styles($stripe: $table-stripe, $is-striped: $table-is-striped) {
107
+ thead,
108
+ tbody,
109
+ tfoot {
110
+ border: $table-border;
111
+ background-color: $table-background;
112
+ }
113
+
114
+ // Caption
115
+ caption {
116
+ padding: $table-padding;
117
+ font-weight: $global-weight-bold;
118
+ }
119
+
120
+ // Table head
121
+ thead {
122
+ background: $table-head-background;
123
+ color: $table-head-font-color;
124
+ }
125
+
126
+ // Table foot
127
+ tfoot {
128
+ background: $table-foot-background;
129
+ color: $table-foot-font-color;
130
+ }
131
+
132
+ // Table head and foot
133
+ thead,
134
+ tfoot {
135
+ // Rows within head and foot
136
+ tr {
137
+ background: transparent;
138
+ }
139
+
140
+ // Cells within head and foot
141
+ th,
142
+ td {
143
+ padding: $table-padding;
144
+ font-weight: $global-weight-bold;
145
+ text-align: #{$global-left};
146
+ }
147
+ }
148
+
149
+ // Table rows
150
+ tbody {
151
+ th,
152
+ td {
153
+ padding: $table-padding;
154
+ }
155
+ }
156
+
157
+ // If tables are striped
158
+ @if $is-striped == true {
159
+ tbody {
160
+ @include -zf-table-stripe($stripe);
161
+ }
162
+
163
+ &.unstriped {
164
+ tbody {
165
+ @include -zf-table-unstripe();
166
+ background-color: $table-background;
167
+ }
168
+ }
169
+ }
170
+
171
+ // If tables are not striped
172
+ @else if $is-striped == false {
173
+ tbody {
174
+ @include -zf-table-unstripe();
175
+ }
176
+
177
+ &.striped {
178
+ tbody {
179
+ @include -zf-table-stripe($stripe);
180
+ }
181
+ }
182
+ }
183
+ }
184
+
185
+ /// Adds the general styles for tables.
186
+ /// @param {Keyword} $stripe [$table-stripe] - Uses keywords even, odd, or none to darken rows of the table. The default value is even.
187
+ @mixin table(
188
+ $stripe: $table-stripe,
189
+ $nest: false
190
+ ) {
191
+ width: 100%;
192
+ margin-bottom: $global-margin;
193
+ border-radius: $global-radius;
194
+
195
+ @if $nest {
196
+ @include -zf-table-children-styles($stripe);
197
+ }
198
+ @else {
199
+ @at-root {
200
+ @include -zf-table-children-styles($stripe);
201
+ }
202
+ }
203
+ }
204
+
205
+ /// Adds the ability to horizontally scroll the table when the content overflows horizontally.
206
+ @mixin table-scroll {
207
+ display: block;
208
+ width: 100%;
209
+ overflow-x: auto;
210
+ }
211
+
212
+ /// Slightly darkens the table rows on hover.
213
+ @mixin table-hover {
214
+ thead tr {
215
+ //Darkens the table header rows on hover.
216
+ &:hover {
217
+ background-color: $table-head-row-hover;
218
+ }
219
+ }
220
+
221
+ tfoot tr {
222
+ //Darkens the table footer rows on hover.
223
+ &:hover {
224
+ background-color: $table-foot-row-hover;
225
+ }
226
+ }
227
+
228
+ tbody tr {
229
+ //Darkens the non-striped table rows on hover.
230
+ &:hover {
231
+ background-color: $table-row-hover;
232
+ }
233
+ }
234
+
235
+ @if $table-is-striped == true {
236
+ // Darkens the even striped table rows.
237
+ @if($table-stripe == even) {
238
+ &:not(.unstriped) tr:nth-of-type(even):hover {
239
+ background-color: $table-row-stripe-hover;
240
+ }
241
+ }
242
+
243
+ // Darkens the odd striped table rows.
244
+ @elseif($table-stripe == odd) {
245
+ &:not(.unstriped) tr:nth-of-type(odd):hover {
246
+ background-color: $table-row-stripe-hover;
247
+ }
248
+ }
249
+ }
250
+
251
+ @else if $table-is-striped == false {
252
+ // Darkens the even striped table rows.
253
+ @if($table-stripe == even) {
254
+ &.striped tr:nth-of-type(even):hover {
255
+ background-color: $table-row-stripe-hover;
256
+ }
257
+ }
258
+
259
+ // Darkens the odd striped table rows.
260
+ @elseif($table-stripe == odd) {
261
+ &.striped tr:nth-of-type(odd):hover {
262
+ background-color: $table-row-stripe-hover;
263
+ }
264
+ }
265
+ }
266
+ }
267
+
268
+ /// Adds styles for a stacked table. Useful for small-screen layouts.
269
+ /// @param {Boolean} $header [$show-header-for-stacked] - Show the first th of header when stacked.
270
+ @mixin table-stack($header: $show-header-for-stacked) {
271
+ @if $header {
272
+ thead {
273
+ th:first-child {
274
+ display: block;
275
+ }
276
+
277
+ th {
278
+ display: none;
279
+ }
280
+ }
281
+ }
282
+ @else {
283
+ thead {
284
+ display: none;
285
+ }
286
+ }
287
+
288
+ tfoot {
289
+ display: none;
290
+ }
291
+
292
+ tr,
293
+ th,
294
+ td {
295
+ display: block;
296
+ }
297
+
298
+ td {
299
+ border-top: 0;
300
+ }
301
+ }
302
+
303
+ @mixin foundation-table($nest: false) {
304
+ table {
305
+ @include table($nest: $nest);
306
+ }
307
+
308
+ table.stack {
309
+ @include breakpoint(medium down) {
310
+ @include table-stack;
311
+ }
312
+ }
313
+
314
+ table.scroll {
315
+ @include table-scroll;
316
+ }
317
+
318
+ table.hover {
319
+ @include table-hover;
320
+ }
321
+
322
+ .table-scroll {
323
+ overflow-x: auto;
324
+
325
+ table {
326
+ width: auto;
327
+ }
328
+ }
329
+ }