foundation-rails 5.5.3.2 → 6.1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (169) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/README.md +2 -8
  4. data/Rakefile +23 -0
  5. data/app/views/foundation/rails/styleguide/show.html.erb +2 -5
  6. data/bower.json +2 -2
  7. data/lib/foundation/rails/version.rb +1 -1
  8. data/lib/generators/foundation/install_generator.rb +6 -3
  9. data/lib/generators/foundation/templates/_settings.scss +546 -0
  10. data/lib/generators/foundation/templates/application.html.erb +0 -1
  11. data/lib/generators/foundation/templates/application.html.haml +0 -2
  12. data/lib/generators/foundation/templates/application.html.slim +0 -2
  13. data/lib/generators/foundation/templates/foundation_and_overrides.scss +51 -0
  14. data/vendor/assets/js/foundation.abide.js +418 -0
  15. data/vendor/assets/js/foundation.accordion.js +229 -0
  16. data/vendor/assets/js/foundation.accordionMenu.js +262 -0
  17. data/vendor/assets/js/foundation.core.js +378 -0
  18. data/vendor/assets/js/foundation.drilldown.js +321 -0
  19. data/vendor/assets/js/foundation.dropdown.js +390 -0
  20. data/vendor/assets/js/foundation.dropdownMenu.js +391 -0
  21. data/vendor/assets/js/foundation.equalizer.js +274 -0
  22. data/vendor/assets/js/foundation.interchange.js +184 -0
  23. data/vendor/assets/js/foundation.js +28 -0
  24. data/vendor/assets/js/foundation.magellan.js +212 -0
  25. data/vendor/assets/js/foundation.offcanvas.js +371 -0
  26. data/vendor/assets/js/foundation.orbit.js +419 -0
  27. data/vendor/assets/js/foundation.responsiveMenu.js +145 -0
  28. data/vendor/assets/js/foundation.responsiveToggle.js +106 -0
  29. data/vendor/assets/js/foundation.reveal.js +478 -0
  30. data/vendor/assets/js/foundation.slider.js +484 -0
  31. data/vendor/assets/js/foundation.sticky.js +436 -0
  32. data/vendor/assets/js/foundation.tabs.js +306 -0
  33. data/vendor/assets/js/foundation.toggler.js +147 -0
  34. data/vendor/assets/js/foundation.tooltip.js +429 -0
  35. data/vendor/assets/js/foundation.util.box.js +169 -0
  36. data/vendor/assets/js/foundation.util.keyboard.js +115 -0
  37. data/vendor/assets/js/foundation.util.mediaQuery.js +210 -0
  38. data/vendor/assets/js/foundation.util.motion.js +89 -0
  39. data/vendor/assets/js/foundation.util.nest.js +64 -0
  40. data/vendor/assets/js/foundation.util.timerAndImageLoader.js +78 -0
  41. data/vendor/assets/js/foundation.util.touch.js +339 -0
  42. data/vendor/assets/js/foundation.util.triggers.js +222 -0
  43. data/vendor/assets/scss/_global.scss +626 -0
  44. data/vendor/assets/scss/components/_accordion-menu.scss +32 -0
  45. data/vendor/assets/scss/components/_accordion.scss +113 -0
  46. data/vendor/assets/scss/components/_badge.scss +55 -0
  47. data/vendor/assets/scss/components/_breadcrumbs.scss +94 -0
  48. data/vendor/assets/scss/components/_button-group.scss +130 -0
  49. data/vendor/assets/scss/components/_button.scss +265 -0
  50. data/vendor/assets/scss/components/_callout.scss +105 -0
  51. data/vendor/assets/scss/components/_close-button.scss +61 -0
  52. data/vendor/assets/scss/components/_drilldown.scss +75 -0
  53. data/vendor/assets/scss/components/_dropdown-menu.scss +148 -0
  54. data/vendor/assets/scss/components/_dropdown.scss +64 -0
  55. data/vendor/assets/scss/components/_flex-video.scss +63 -0
  56. data/vendor/assets/scss/components/_float.scss +27 -0
  57. data/vendor/assets/scss/components/_label.scss +56 -0
  58. data/vendor/assets/scss/components/_media-object.scss +74 -0
  59. data/vendor/assets/scss/components/_menu.scss +209 -0
  60. data/vendor/assets/scss/components/_off-canvas.scss +180 -0
  61. data/vendor/assets/scss/components/_orbit.scss +193 -0
  62. data/vendor/assets/scss/components/_pagination.scss +158 -0
  63. data/vendor/assets/scss/components/_progress-bar.scss +83 -0
  64. data/vendor/assets/scss/components/_reveal.scss +156 -0
  65. data/vendor/assets/scss/components/_slider.scss +158 -0
  66. data/vendor/assets/scss/components/_sticky.scss +38 -0
  67. data/vendor/assets/scss/components/_switch.scss +232 -0
  68. data/vendor/assets/scss/components/_table.scss +213 -0
  69. data/vendor/assets/scss/components/_tabs.scss +170 -0
  70. data/vendor/assets/scss/components/_thumbnail.scss +54 -0
  71. data/vendor/assets/scss/components/_title-bar.scss +68 -0
  72. data/vendor/assets/scss/components/_tooltip.scss +100 -0
  73. data/vendor/assets/scss/components/_top-bar.scss +89 -0
  74. data/vendor/assets/scss/components/_visibility.scss +131 -0
  75. data/vendor/assets/scss/forms/_checkbox.scss +36 -0
  76. data/vendor/assets/scss/forms/_error.scss +82 -0
  77. data/vendor/assets/scss/forms/_fieldset.scss +53 -0
  78. data/vendor/assets/scss/forms/_forms.scss +32 -0
  79. data/vendor/assets/scss/forms/_help-text.scss +30 -0
  80. data/vendor/assets/scss/forms/_input-group.scss +91 -0
  81. data/vendor/assets/scss/forms/_label.scss +48 -0
  82. data/vendor/assets/scss/forms/_select.scss +63 -0
  83. data/vendor/assets/scss/forms/_text.scss +154 -0
  84. data/vendor/assets/scss/foundation.scss +91 -0
  85. data/vendor/assets/scss/grid/_classes.scss +153 -0
  86. data/vendor/assets/scss/grid/_column.scss +124 -0
  87. data/vendor/assets/scss/grid/_flex-grid.scss +281 -0
  88. data/vendor/assets/scss/grid/_grid.scss +48 -0
  89. data/vendor/assets/scss/grid/_gutter.scss +34 -0
  90. data/vendor/assets/scss/grid/_layout.scss +33 -0
  91. data/vendor/assets/scss/grid/_position.scss +72 -0
  92. data/vendor/assets/scss/grid/_row.scss +97 -0
  93. data/vendor/assets/scss/grid/_size.scss +24 -0
  94. data/vendor/assets/scss/settings/_settings.scss +547 -0
  95. data/vendor/assets/scss/typography/_alignment.scss +22 -0
  96. data/vendor/assets/scss/typography/_base.scss +439 -0
  97. data/vendor/assets/scss/typography/_helpers.scss +77 -0
  98. data/vendor/assets/scss/typography/_print.scss +73 -0
  99. data/vendor/assets/scss/typography/_typography.scss +28 -0
  100. data/vendor/assets/scss/util/_breakpoint.scss +266 -0
  101. data/vendor/assets/scss/util/_color.scss +41 -0
  102. data/vendor/assets/scss/util/_mixins.scss +223 -0
  103. data/vendor/assets/scss/util/_selector.scss +40 -0
  104. data/vendor/assets/scss/util/_unit.scss +90 -0
  105. data/vendor/assets/scss/util/_util.scss +15 -0
  106. data/vendor/assets/scss/util/_value.scss +126 -0
  107. metadata +97 -64
  108. data/update-gem.sh +0 -20
  109. data/vendor/assets/javascripts/foundation.js +0 -17
  110. data/vendor/assets/javascripts/foundation/foundation.abide.js +0 -426
  111. data/vendor/assets/javascripts/foundation/foundation.accordion.js +0 -125
  112. data/vendor/assets/javascripts/foundation/foundation.alert.js +0 -43
  113. data/vendor/assets/javascripts/foundation/foundation.clearing.js +0 -586
  114. data/vendor/assets/javascripts/foundation/foundation.dropdown.js +0 -468
  115. data/vendor/assets/javascripts/foundation/foundation.equalizer.js +0 -104
  116. data/vendor/assets/javascripts/foundation/foundation.interchange.js +0 -360
  117. data/vendor/assets/javascripts/foundation/foundation.joyride.js +0 -935
  118. data/vendor/assets/javascripts/foundation/foundation.js +0 -732
  119. data/vendor/assets/javascripts/foundation/foundation.magellan.js +0 -214
  120. data/vendor/assets/javascripts/foundation/foundation.offcanvas.js +0 -225
  121. data/vendor/assets/javascripts/foundation/foundation.orbit.js +0 -476
  122. data/vendor/assets/javascripts/foundation/foundation.reveal.js +0 -522
  123. data/vendor/assets/javascripts/foundation/foundation.slider.js +0 -296
  124. data/vendor/assets/javascripts/foundation/foundation.tab.js +0 -247
  125. data/vendor/assets/javascripts/foundation/foundation.tooltip.js +0 -348
  126. data/vendor/assets/javascripts/foundation/foundation.topbar.js +0 -458
  127. data/vendor/assets/javascripts/vendor/modernizr.js +0 -1406
  128. data/vendor/assets/stylesheets/foundation.scss +0 -42
  129. data/vendor/assets/stylesheets/foundation/_functions.scss +0 -156
  130. data/vendor/assets/stylesheets/foundation/_settings.scss +0 -1489
  131. data/vendor/assets/stylesheets/foundation/components/_accordion.scss +0 -161
  132. data/vendor/assets/stylesheets/foundation/components/_alert-boxes.scss +0 -128
  133. data/vendor/assets/stylesheets/foundation/components/_block-grid.scss +0 -133
  134. data/vendor/assets/stylesheets/foundation/components/_breadcrumbs.scss +0 -132
  135. data/vendor/assets/stylesheets/foundation/components/_button-groups.scss +0 -208
  136. data/vendor/assets/stylesheets/foundation/components/_buttons.scss +0 -261
  137. data/vendor/assets/stylesheets/foundation/components/_clearing.scss +0 -260
  138. data/vendor/assets/stylesheets/foundation/components/_dropdown-buttons.scss +0 -130
  139. data/vendor/assets/stylesheets/foundation/components/_dropdown.scss +0 -269
  140. data/vendor/assets/stylesheets/foundation/components/_flex-video.scss +0 -51
  141. data/vendor/assets/stylesheets/foundation/components/_forms.scss +0 -607
  142. data/vendor/assets/stylesheets/foundation/components/_global.scss +0 -566
  143. data/vendor/assets/stylesheets/foundation/components/_grid.scss +0 -292
  144. data/vendor/assets/stylesheets/foundation/components/_icon-bar.scss +0 -460
  145. data/vendor/assets/stylesheets/foundation/components/_inline-lists.scss +0 -58
  146. data/vendor/assets/stylesheets/foundation/components/_joyride.scss +0 -220
  147. data/vendor/assets/stylesheets/foundation/components/_keystrokes.scss +0 -60
  148. data/vendor/assets/stylesheets/foundation/components/_labels.scss +0 -106
  149. data/vendor/assets/stylesheets/foundation/components/_magellan.scss +0 -34
  150. data/vendor/assets/stylesheets/foundation/components/_offcanvas.scss +0 -606
  151. data/vendor/assets/stylesheets/foundation/components/_orbit.scss +0 -388
  152. data/vendor/assets/stylesheets/foundation/components/_pagination.scss +0 -163
  153. data/vendor/assets/stylesheets/foundation/components/_panels.scss +0 -107
  154. data/vendor/assets/stylesheets/foundation/components/_pricing-tables.scss +0 -150
  155. data/vendor/assets/stylesheets/foundation/components/_progress-bars.scss +0 -85
  156. data/vendor/assets/stylesheets/foundation/components/_range-slider.scss +0 -177
  157. data/vendor/assets/stylesheets/foundation/components/_reveal.scss +0 -212
  158. data/vendor/assets/stylesheets/foundation/components/_side-nav.scss +0 -120
  159. data/vendor/assets/stylesheets/foundation/components/_split-buttons.scss +0 -203
  160. data/vendor/assets/stylesheets/foundation/components/_sub-nav.scss +0 -125
  161. data/vendor/assets/stylesheets/foundation/components/_switches.scss +0 -241
  162. data/vendor/assets/stylesheets/foundation/components/_tables.scss +0 -135
  163. data/vendor/assets/stylesheets/foundation/components/_tabs.scss +0 -142
  164. data/vendor/assets/stylesheets/foundation/components/_thumbs.scss +0 -66
  165. data/vendor/assets/stylesheets/foundation/components/_tooltips.scss +0 -142
  166. data/vendor/assets/stylesheets/foundation/components/_top-bar.scss +0 -745
  167. data/vendor/assets/stylesheets/foundation/components/_type.scss +0 -525
  168. data/vendor/assets/stylesheets/foundation/components/_visibility.scss +0 -425
  169. data/vendor/assets/stylesheets/normalize.scss +0 -424
@@ -0,0 +1,158 @@
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 height of the slider.
13
+ /// @type Number
14
+ $slider-height: 0.5rem !default;
15
+
16
+ /// Default slider width of a vertical slider.
17
+ /// @type Number
18
+ $slider-width-vertical: $slider-height !default;
19
+
20
+ /// Default background color of the slider's track.
21
+ /// @type Color
22
+ $slider-background: $light-gray !default;
23
+
24
+ /// Default color of the active fill color of the slider.
25
+ /// @type Color
26
+ $slider-fill-background: $medium-gray !default;
27
+
28
+ /// Default height of the handle of the slider.
29
+ /// @type Number
30
+ $slider-handle-height: 1.4rem !default;
31
+
32
+ /// Default width of the handle of the slider.
33
+ /// @type Number
34
+ $slider-handle-width: 1.4rem !default;
35
+
36
+ /// Default color of the handle for the slider.
37
+ /// @type Color
38
+ $slider-handle-background: $primary-color !default;
39
+
40
+ /// Default fade amount of a disabled slider.
41
+ /// @type Number
42
+ $slider-opacity-disabled: 0.25 !default;
43
+
44
+ /// Default radius for slider.
45
+ /// @type Number
46
+ $slider-radius: $global-radius !default;
47
+
48
+ /// Transition properties to apply to the slider handle and fill.
49
+ /// @type Transition
50
+ $slider-transition: all 0.2s ease-in-out !default;
51
+
52
+ /// Adds the general styles for sliders.
53
+ @mixin slider-container {
54
+ position: relative;
55
+ height: $slider-height;
56
+ margin-top: 1.25rem;
57
+ margin-bottom: 2.25rem;
58
+ background-color: $slider-background;
59
+ cursor: pointer;
60
+ user-select: none;
61
+ touch-action: none;
62
+ }
63
+
64
+ /// Adds the general styles for active fill for sliders.
65
+ @mixin slider-fill {
66
+ position: absolute;
67
+ top: 0;
68
+ left: 0;
69
+ display: inline-block;
70
+ max-width: 100%;
71
+ height: $slider-height;
72
+ background-color: $slider-fill-background;
73
+ transition: $slider-transition;
74
+
75
+ &.is-dragging {
76
+ transition: all 0s linear;
77
+ }
78
+ }
79
+
80
+ /// Adds the general styles for the slider handles.
81
+ @mixin slider-handle {
82
+ @include disable-mouse-outline;
83
+ @include vertical-center;
84
+ position: absolute;
85
+ left: 0;
86
+ z-index: 1;
87
+ display: inline-block;
88
+ width: $slider-handle-width;
89
+ height: $slider-handle-height;
90
+ background-color: $slider-handle-background;
91
+ transition: $slider-transition;
92
+ touch-action: manipulation;
93
+ border-radius: $slider-radius;
94
+
95
+ &:hover {
96
+ background-color: scale-color($slider-handle-background, $lightness: -15%);
97
+ }
98
+
99
+ &.is-dragging {
100
+ transition: all 0s linear;
101
+ }
102
+ }
103
+
104
+ @mixin slider-disabled {
105
+ opacity: $slider-opacity-disabled;
106
+ cursor: not-allowed;
107
+ }
108
+
109
+ @mixin slider-vertical {
110
+ display: inline-block;
111
+ width: $slider-width-vertical;
112
+ height: 12.5rem;
113
+ margin: 0 1.25rem;
114
+ transform: scale(1, -1);
115
+
116
+ .slider-fill {
117
+ top: 0;
118
+ width: $slider-width-vertical;
119
+ max-height: 100%;
120
+ }
121
+
122
+ .slider-handle {
123
+ position: absolute;
124
+ top: 0;
125
+ left: 50%;
126
+ width: $slider-handle-height;
127
+ height: $slider-handle-width;
128
+ transform: translateX(-50%);
129
+ }
130
+ }
131
+
132
+ @mixin foundation-slider {
133
+ // Container
134
+ .slider {
135
+ @include slider-container;
136
+ }
137
+
138
+ // Fill area
139
+ .slider-fill {
140
+ @include slider-fill;
141
+ }
142
+
143
+ // Draggable handle
144
+ .slider-handle {
145
+ @include slider-handle;
146
+ }
147
+
148
+ // Disabled state
149
+ .slider.disabled,
150
+ .slider[disabled] {
151
+ @include slider-disabled;
152
+ }
153
+
154
+ // Vertical slider
155
+ .slider.vertical {
156
+ @include slider-vertical;
157
+ }
158
+ }
@@ -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: absolute;
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: absolute;
31
+ left: auto;
32
+ right: auto;
33
+
34
+ &.is-at-bottom {
35
+ bottom: 0;
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,232 @@
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
+ margin-bottom: $switch-margin;
64
+ outline: 0;
65
+ position: relative;
66
+ user-select: none;
67
+
68
+ // These properties cascade down to the switch text
69
+ color: $white;
70
+ font-weight: bold;
71
+ font-size: rem-calc(14);
72
+ }
73
+
74
+ /// Adds styles for a switch input. Apply this to an `<input>` within a switch.
75
+ @mixin switch-input {
76
+ opacity: 0;
77
+ position: absolute;
78
+ }
79
+
80
+ /// Adds styles for the background and paddle of a switch. Apply this to a `<label>` within a switch.
81
+ @mixin switch-paddle {
82
+ background: $switch-background;
83
+ cursor: pointer;
84
+ display: block;
85
+ position: relative;
86
+ width: 4rem;
87
+ height: $switch-height;
88
+ transition: $switch-paddle-transition;
89
+ border-radius: $switch-radius;
90
+
91
+ // Resetting these <label> presets so type styles cascade down
92
+ color: inherit;
93
+ font-weight: inherit;
94
+
95
+ // Needed to override specificity
96
+ input + & {
97
+ margin: 0;
98
+ }
99
+
100
+ // The paddle itself
101
+ &::after {
102
+ background: $switch-paddle-background;
103
+ content: '';
104
+ display: block;
105
+ position: absolute;
106
+ height: 1.5rem;
107
+ #{$global-left}: 0.25rem;
108
+ top: 0.25rem;
109
+ width: 1.5rem;
110
+ transition: $switch-paddle-transition;
111
+ transform: translate3d(0, 0, 0);
112
+ border-radius: $switch-paddle-radius;
113
+ }
114
+
115
+ // Change the visual style when the switch is active
116
+ input:checked ~ & {
117
+ background: $switch-background-active;
118
+
119
+ &::after {
120
+ #{$global-left}: 2.25rem;
121
+ }
122
+ }
123
+
124
+ input:focus ~ & {
125
+ @include disable-mouse-outline;
126
+ }
127
+ }
128
+
129
+ /// Adds base styles for active/inactive text inside a switch. Apply this to text elements inside the switch `<label>`.
130
+ @mixin switch-text {
131
+ position: absolute;
132
+ top: 50%;
133
+ transform: translateY(-50%);
134
+ }
135
+
136
+ /// Adds styles for the active state text within a switch.
137
+ @mixin switch-text-active {
138
+ #{$global-left}: 8%;
139
+ display: none;
140
+
141
+ input:checked + label > & {
142
+ display: block;
143
+ }
144
+ }
145
+
146
+ /// Adds styles for the inactive state text within a switch.
147
+ @mixin switch-text-inactive {
148
+ #{$global-right}: 15%;
149
+
150
+ input:checked + label > & {
151
+ display: none;
152
+ }
153
+ }
154
+
155
+ /// Changes the size of a switch by modifying the size of the body and paddle. Apply this to a switch container.
156
+ /// @param {Number} $font-size [1rem] - Font size of label text within the switch.
157
+ /// @param {Number} $width [4rem] - Width of the switch body.
158
+ /// @param {Number} $height [2rem] - Height of the switch body.
159
+ /// @param {Number} $paddle-width [1.5rem] - Width of the switch paddle.
160
+ /// @param {Number} $paddle-offset [0.25rem] - Spacing between the switch paddle and the edge of the switch body.
161
+ @mixin switch-size(
162
+ $font-size: 1rem,
163
+ $width: 4rem,
164
+ $height: 2rem,
165
+ $paddle-width: 1.5rem,
166
+ $paddle-offset: 0.25rem
167
+ ) {
168
+ $paddle-height: $height - ($paddle-offset * 2);
169
+ $paddle-left-active: $width - $paddle-width - $paddle-offset;
170
+
171
+ .switch-paddle {
172
+ width: $width;
173
+ height: $height;
174
+ font-size: $font-size;
175
+ }
176
+
177
+ .switch-paddle::after {
178
+ width: $paddle-width;
179
+ height: $paddle-height;
180
+ }
181
+
182
+ input:checked ~ .switch-paddle:after {
183
+ #{$global-left}: $paddle-left-active;
184
+ }
185
+ }
186
+
187
+ @mixin foundation-switch {
188
+ // Container class
189
+ .switch {
190
+ @include switch-container;
191
+ }
192
+
193
+ // <input> element
194
+ .switch-input {
195
+ @include switch-input;
196
+ }
197
+
198
+ // <label> element
199
+ .switch-paddle {
200
+ @include switch-paddle;
201
+ }
202
+
203
+ // Base label text styles
204
+ %switch-text {
205
+ @include switch-text;
206
+ }
207
+
208
+ // Active label text styles
209
+ .switch-active {
210
+ @extend %switch-text;
211
+ @include switch-text-active;
212
+ }
213
+
214
+ // Inactive label text styles
215
+ .switch-inactive {
216
+ @extend %switch-text;
217
+ @include switch-text-inactive;
218
+ }
219
+
220
+ // Switch sizes
221
+ .switch.tiny {
222
+ @include switch-size(rem-calc(10), 3rem, $switch-height-tiny, 1rem, $switch-paddle-offset);
223
+ }
224
+
225
+ .switch.small {
226
+ @include switch-size(rem-calc(12), 3.5rem, $switch-height-small, 1.25rem, $switch-paddle-offset);
227
+ }
228
+
229
+ .switch.large {
230
+ @include switch-size(rem-calc(16), 5rem, $switch-height-large, 2rem, $switch-paddle-offset);
231
+ }
232
+ }
@@ -0,0 +1,213 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ // scss-lint:disable MergeableSelector, QualifyingElement
6
+
7
+ ////
8
+ /// @group table
9
+ ////
10
+
11
+ /// Defualt color for table background.
12
+ /// @type Color
13
+ $table-background: $white !default;
14
+
15
+ /// Defualt scale for darkening the striped table rows and the table border.
16
+ /// @type Number
17
+ $table-color-scale: 5% !default;
18
+
19
+ /// Defualt style for table border.
20
+ /// @type List
21
+ $table-border: 1px solid smart-scale($table-background, $table-color-scale) !default;
22
+
23
+ /// Defualt padding for table.
24
+ /// @type Number
25
+ $table-padding: rem-calc(8 10 10) !default;
26
+
27
+ /// Defualt scale for darkening the table rows on hover.
28
+ /// @type Number
29
+ $table-hover-scale: 2% !default;
30
+
31
+ /// Defualt color of standard rows on hover.
32
+ /// @type List
33
+ $table-row-hover: darken($table-background, $table-hover-scale) !default;
34
+
35
+ /// Defualt 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
+ /// Defualt background color for striped rows.
40
+ /// @type Color
41
+ $table-striped-background: smart-scale($table-background, $table-color-scale) !default;
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.
44
+ /// @type Keyoword
45
+ $table-stripe: even !default;
46
+
47
+ /// Defualt color for header background.
48
+ /// @type Color
49
+ $table-head-background: smart-scale($table-background, $table-color-scale / 2) !default;
50
+
51
+ /// Defualt color for footer background.
52
+ /// @type Color
53
+ $table-foot-background: smart-scale($table-background, $table-color-scale) !default;
54
+
55
+ /// Defualt font color for header.
56
+ /// @type Color
57
+ $table-head-font-color: $body-font-color !default;
58
+
59
+ /// Defualt value for showing the header when using stacked tables.
60
+ /// @type Boolean
61
+ $show-header-for-stacked: false !default;
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;
68
+
69
+ @at-root {
70
+ thead,
71
+ tbody,
72
+ tfoot {
73
+ border: $table-border;
74
+ background-color: $table-background;
75
+ }
76
+
77
+ // Caption
78
+ caption {
79
+ font-weight: $global-weight-bold;
80
+ padding: $table-padding;
81
+ }
82
+
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;
92
+ }
93
+
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};
100
+ }
101
+ }
102
+
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
+ }
112
+
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
+ }
120
+
121
+ th,
122
+ td {
123
+ padding: $table-padding;
124
+ }
125
+ }
126
+ }
127
+ }
128
+
129
+ /// Adds the ability to horizontally scroll the table when the content overflows horizontally.
130
+ @mixin table-scroll {
131
+ display: block;
132
+ width: 100%;
133
+ overflow-x: auto;
134
+ }
135
+
136
+ /// Slightly darkens the table rows on hover.
137
+ @mixin table-hover {
138
+ tr {
139
+ //Darkens the non-striped table rows on hover.
140
+ &:hover {
141
+ background-color: $table-row-hover;
142
+ }
143
+
144
+ //Darkens the even striped table rows.
145
+ @if($table-stripe == even) {
146
+ &:nth-of-type(even):hover {
147
+ background-color: $table-row-stripe-hover;
148
+ }
149
+ }
150
+
151
+ //Darkens the odd striped table rows.
152
+ @elseif($table-stripe == odd) {
153
+ &:nth-of-type(odd):hover {
154
+ background-color: $table-row-stripe-hover;
155
+ }
156
+ }
157
+ }
158
+ }
159
+
160
+ /// Adds styles for a stacked table. Useful for small-screen layouts.
161
+ /// @param {Boolean} $header [$show-header-for-stacked] - Show the first th of header when stacked.
162
+ @mixin table-stack($header: $show-header-for-stacked) {
163
+ @if $header {
164
+ thead {
165
+ th:first-child {
166
+ display: block;
167
+ }
168
+
169
+ th {
170
+ display: none;
171
+ }
172
+ }
173
+ }
174
+ @else {
175
+ thead {
176
+ display: none;
177
+ }
178
+ }
179
+
180
+ tfoot {
181
+ display: none;
182
+ }
183
+
184
+ tr,
185
+ th,
186
+ td {
187
+ display: block;
188
+ }
189
+
190
+ td {
191
+ border-top: 0;
192
+ }
193
+ }
194
+
195
+ @mixin foundation-table {
196
+ table {
197
+ @include table;
198
+ }
199
+
200
+ table.stack {
201
+ @include breakpoint(medium down) {
202
+ @include table-stack;
203
+ }
204
+ }
205
+
206
+ table.scroll {
207
+ @include table-scroll;
208
+ }
209
+
210
+ table.hover {
211
+ @include table-hover;
212
+ }
213
+ }