jekyll-theme-foundation 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +48 -0
- data/_includes/google-analytics.html +8 -0
- data/_includes/head.html +17 -0
- data/_includes/scripts.html +4 -0
- data/_layouts/default.html +16 -0
- data/_layouts/home.html +5 -0
- data/_layouts/page.html +5 -0
- data/_layouts/post.html +5 -0
- data/_sass/_vendor/normalize-scss/sass/_normalize.scss +3 -0
- data/_sass/_vendor/normalize-scss/sass/normalize/_import-now.scss +11 -0
- data/_sass/_vendor/normalize-scss/sass/normalize/_normalize-mixin.scss +676 -0
- data/_sass/_vendor/normalize-scss/sass/normalize/_variables.scss +36 -0
- data/_sass/_vendor/normalize-scss/sass/normalize/_vertical-rhythm.scss +61 -0
- data/_sass/_vendor/sassy-lists/stylesheets/functions/_contain.scss +31 -0
- data/_sass/_vendor/sassy-lists/stylesheets/functions/_purge.scss +38 -0
- data/_sass/_vendor/sassy-lists/stylesheets/functions/_remove.scss +31 -0
- data/_sass/_vendor/sassy-lists/stylesheets/functions/_replace.scss +46 -0
- data/_sass/_vendor/sassy-lists/stylesheets/functions/_to-list.scss +27 -0
- data/_sass/_vendor/sassy-lists/stylesheets/helpers/_missing-dependencies.scss +25 -0
- data/_sass/_vendor/sassy-lists/stylesheets/helpers/_true.scss +13 -0
- data/_sass/assets/foundation-float.scss +5 -0
- data/_sass/assets/foundation-prototype.scss +3 -0
- data/_sass/assets/foundation-rtl.scss +5 -0
- data/_sass/assets/foundation.scss +3 -0
- data/_sass/jekyll-theme-foundation.scss +5 -0
- data/_sass/scss/_global.scss +249 -0
- data/_sass/scss/components/_accordion-menu.scss +171 -0
- data/_sass/scss/components/_accordion.scss +155 -0
- data/_sass/scss/components/_badge.scss +63 -0
- data/_sass/scss/components/_breadcrumbs.scss +117 -0
- data/_sass/scss/components/_button-group.scss +253 -0
- data/_sass/scss/components/_button.scss +385 -0
- data/_sass/scss/components/_callout.scss +106 -0
- data/_sass/scss/components/_card.scss +129 -0
- data/_sass/scss/components/_close-button.scss +102 -0
- data/_sass/scss/components/_drilldown.scss +142 -0
- data/_sass/scss/components/_dropdown-menu.scss +274 -0
- data/_sass/scss/components/_dropdown.scss +79 -0
- data/_sass/scss/components/_flex-video.scss +1 -0
- data/_sass/scss/components/_flex.scss +117 -0
- data/_sass/scss/components/_float.scss +27 -0
- data/_sass/scss/components/_label.scss +64 -0
- data/_sass/scss/components/_media-object.scss +114 -0
- data/_sass/scss/components/_menu-icon.scss +9 -0
- data/_sass/scss/components/_menu.scss +495 -0
- data/_sass/scss/components/_off-canvas.scss +506 -0
- data/_sass/scss/components/_orbit.scss +196 -0
- data/_sass/scss/components/_pagination.scss +193 -0
- data/_sass/scss/components/_progress-bar.scss +64 -0
- data/_sass/scss/components/_responsive-embed.scss +70 -0
- data/_sass/scss/components/_reveal.scss +180 -0
- data/_sass/scss/components/_slider.scss +137 -0
- data/_sass/scss/components/_sticky.scss +39 -0
- data/_sass/scss/components/_switch.scss +247 -0
- data/_sass/scss/components/_table.scss +330 -0
- data/_sass/scss/components/_tabs.scss +196 -0
- data/_sass/scss/components/_thumbnail.scss +67 -0
- data/_sass/scss/components/_title-bar.scss +84 -0
- data/_sass/scss/components/_tooltip.scss +160 -0
- data/_sass/scss/components/_top-bar.scss +175 -0
- data/_sass/scss/components/_visibility.scss +132 -0
- data/_sass/scss/forms/_checkbox.scss +41 -0
- data/_sass/scss/forms/_error.scss +88 -0
- data/_sass/scss/forms/_fieldset.scss +53 -0
- data/_sass/scss/forms/_forms.scss +34 -0
- data/_sass/scss/forms/_help-text.scss +30 -0
- data/_sass/scss/forms/_input-group.scss +142 -0
- data/_sass/scss/forms/_label.scss +50 -0
- data/_sass/scss/forms/_meter.scss +116 -0
- data/_sass/scss/forms/_progress.scss +94 -0
- data/_sass/scss/forms/_range.scss +149 -0
- data/_sass/scss/forms/_select.scss +86 -0
- data/_sass/scss/forms/_text.scss +179 -0
- data/_sass/scss/foundation.scss +133 -0
- data/_sass/scss/grid/_classes.scss +176 -0
- data/_sass/scss/grid/_column.scss +112 -0
- data/_sass/scss/grid/_flex-grid.scss +259 -0
- data/_sass/scss/grid/_grid.scss +48 -0
- data/_sass/scss/grid/_gutter.scss +82 -0
- data/_sass/scss/grid/_layout.scss +76 -0
- data/_sass/scss/grid/_position.scss +76 -0
- data/_sass/scss/grid/_row.scss +99 -0
- data/_sass/scss/grid/_size.scss +24 -0
- data/_sass/scss/prototype/_arrow.scss +36 -0
- data/_sass/scss/prototype/_border-box.scss +35 -0
- data/_sass/scss/prototype/_border-none.scss +35 -0
- data/_sass/scss/prototype/_bordered.scss +54 -0
- data/_sass/scss/prototype/_box.scss +23 -0
- data/_sass/scss/prototype/_display.scss +50 -0
- data/_sass/scss/prototype/_font-styling.scss +95 -0
- data/_sass/scss/prototype/_list-style-type.scss +95 -0
- data/_sass/scss/prototype/_overflow.scss +72 -0
- data/_sass/scss/prototype/_position.scss +114 -0
- data/_sass/scss/prototype/_prototype.scss +87 -0
- data/_sass/scss/prototype/_relation.scss +157 -0
- data/_sass/scss/prototype/_rotate.scss +31 -0
- data/_sass/scss/prototype/_rounded.scss +54 -0
- data/_sass/scss/prototype/_separator.scss +96 -0
- data/_sass/scss/prototype/_shadow.scss +43 -0
- data/_sass/scss/prototype/_sizing.scss +73 -0
- data/_sass/scss/prototype/_spacing.scss +204 -0
- data/_sass/scss/prototype/_text-decoration.scss +48 -0
- data/_sass/scss/prototype/_text-transformation.scss +48 -0
- data/_sass/scss/prototype/_text-utilities.scss +88 -0
- data/_sass/scss/settings/_settings.scss +869 -0
- data/_sass/scss/typography/_alignment.scss +22 -0
- data/_sass/scss/typography/_base.scss +509 -0
- data/_sass/scss/typography/_helpers.scss +80 -0
- data/_sass/scss/typography/_print.scss +86 -0
- data/_sass/scss/typography/_typography.scss +26 -0
- data/_sass/scss/util/_breakpoint.scss +348 -0
- data/_sass/scss/util/_color.scss +129 -0
- data/_sass/scss/util/_direction.scss +31 -0
- data/_sass/scss/util/_flex.scss +85 -0
- data/_sass/scss/util/_math.scss +72 -0
- data/_sass/scss/util/_mixins.scss +313 -0
- data/_sass/scss/util/_selector.scss +41 -0
- data/_sass/scss/util/_typography.scss +26 -0
- data/_sass/scss/util/_unit.scss +152 -0
- data/_sass/scss/util/_util.scss +14 -0
- data/_sass/scss/util/_value.scss +160 -0
- data/_sass/scss/xy-grid/_cell.scss +169 -0
- data/_sass/scss/xy-grid/_classes.scss +476 -0
- data/_sass/scss/xy-grid/_collapse.scss +74 -0
- data/_sass/scss/xy-grid/_frame.scss +85 -0
- data/_sass/scss/xy-grid/_grid.scss +35 -0
- data/_sass/scss/xy-grid/_gutters.scss +45 -0
- data/_sass/scss/xy-grid/_layout.scss +33 -0
- data/_sass/scss/xy-grid/_position.scss +28 -0
- data/_sass/scss/xy-grid/_xy-grid.scss +51 -0
- data/assets/css/main.scss +5 -0
- data/assets/css/motion-ui.min.css +1 -0
- data/assets/js/foundation.min.js +5 -0
- data/assets/js/motion-ui.min.js +1 -0
- metadata +235 -0
@@ -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,330 @@
|
|
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
|
+
/// Breakpoint at which stacked table switches from mobile to desktop view.
|
80
|
+
/// @type Breakpoint
|
81
|
+
$table-stack-breakpoint: medium !default;
|
82
|
+
|
83
|
+
@mixin -zf-table-stripe($stripe: $table-stripe) {
|
84
|
+
tr {
|
85
|
+
// If stripe is set to even, darken the even rows.
|
86
|
+
@if $stripe == even {
|
87
|
+
&:nth-child(even) {
|
88
|
+
border-bottom: 0;
|
89
|
+
background-color: $table-striped-background;
|
90
|
+
}
|
91
|
+
}
|
92
|
+
|
93
|
+
// If stripe is set to odd, darken the odd rows.
|
94
|
+
@else if $stripe == odd {
|
95
|
+
&:nth-child(odd) {
|
96
|
+
background-color: $table-striped-background;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
102
|
+
@mixin -zf-table-unstripe() {
|
103
|
+
tr {
|
104
|
+
border-bottom: 0;
|
105
|
+
border-bottom: $table-border;
|
106
|
+
background-color: $table-background;
|
107
|
+
}
|
108
|
+
}
|
109
|
+
|
110
|
+
@mixin -zf-table-children-styles($stripe: $table-stripe, $is-striped: $table-is-striped) {
|
111
|
+
thead,
|
112
|
+
tbody,
|
113
|
+
tfoot {
|
114
|
+
border: $table-border;
|
115
|
+
background-color: $table-background;
|
116
|
+
}
|
117
|
+
|
118
|
+
// Caption
|
119
|
+
caption {
|
120
|
+
padding: $table-padding;
|
121
|
+
font-weight: $global-weight-bold;
|
122
|
+
}
|
123
|
+
|
124
|
+
// Table head
|
125
|
+
thead {
|
126
|
+
background: $table-head-background;
|
127
|
+
color: $table-head-font-color;
|
128
|
+
}
|
129
|
+
|
130
|
+
// Table foot
|
131
|
+
tfoot {
|
132
|
+
background: $table-foot-background;
|
133
|
+
color: $table-foot-font-color;
|
134
|
+
}
|
135
|
+
|
136
|
+
// Table head and foot
|
137
|
+
thead,
|
138
|
+
tfoot {
|
139
|
+
// Rows within head and foot
|
140
|
+
tr {
|
141
|
+
background: transparent;
|
142
|
+
}
|
143
|
+
|
144
|
+
// Cells within head and foot
|
145
|
+
th,
|
146
|
+
td {
|
147
|
+
padding: $table-padding;
|
148
|
+
font-weight: $global-weight-bold;
|
149
|
+
text-align: #{$global-left};
|
150
|
+
}
|
151
|
+
}
|
152
|
+
|
153
|
+
// Table rows
|
154
|
+
tbody {
|
155
|
+
th,
|
156
|
+
td {
|
157
|
+
padding: $table-padding;
|
158
|
+
}
|
159
|
+
}
|
160
|
+
|
161
|
+
// If tables are striped
|
162
|
+
@if $is-striped == true {
|
163
|
+
tbody {
|
164
|
+
@include -zf-table-stripe($stripe);
|
165
|
+
}
|
166
|
+
|
167
|
+
&.unstriped {
|
168
|
+
tbody {
|
169
|
+
@include -zf-table-unstripe();
|
170
|
+
background-color: $table-background;
|
171
|
+
}
|
172
|
+
}
|
173
|
+
}
|
174
|
+
|
175
|
+
// If tables are not striped
|
176
|
+
@else if $is-striped == false {
|
177
|
+
tbody {
|
178
|
+
@include -zf-table-unstripe();
|
179
|
+
}
|
180
|
+
|
181
|
+
&.striped {
|
182
|
+
tbody {
|
183
|
+
@include -zf-table-stripe($stripe);
|
184
|
+
}
|
185
|
+
}
|
186
|
+
}
|
187
|
+
}
|
188
|
+
|
189
|
+
/// Adds the general styles for tables.
|
190
|
+
/// @param {Keyword} $stripe [$table-stripe] - Uses keywords even, odd, or none to darken rows of the table. The default value is even.
|
191
|
+
@mixin table(
|
192
|
+
$stripe: $table-stripe,
|
193
|
+
$nest: false
|
194
|
+
) {
|
195
|
+
border-collapse: collapse;
|
196
|
+
width: 100%;
|
197
|
+
margin-bottom: $global-margin;
|
198
|
+
border-radius: $global-radius;
|
199
|
+
|
200
|
+
@if $nest {
|
201
|
+
@include -zf-table-children-styles($stripe);
|
202
|
+
}
|
203
|
+
@else {
|
204
|
+
@at-root {
|
205
|
+
@include -zf-table-children-styles($stripe);
|
206
|
+
}
|
207
|
+
}
|
208
|
+
}
|
209
|
+
|
210
|
+
/// Adds the ability to horizontally scroll the table when the content overflows horizontally.
|
211
|
+
@mixin table-scroll {
|
212
|
+
display: block;
|
213
|
+
width: 100%;
|
214
|
+
overflow-x: auto;
|
215
|
+
}
|
216
|
+
|
217
|
+
/// Slightly darkens the table rows on hover.
|
218
|
+
@mixin table-hover {
|
219
|
+
thead tr {
|
220
|
+
//Darkens the table header rows on hover.
|
221
|
+
&:hover {
|
222
|
+
background-color: $table-head-row-hover;
|
223
|
+
}
|
224
|
+
}
|
225
|
+
|
226
|
+
tfoot tr {
|
227
|
+
//Darkens the table footer rows on hover.
|
228
|
+
&:hover {
|
229
|
+
background-color: $table-foot-row-hover;
|
230
|
+
}
|
231
|
+
}
|
232
|
+
|
233
|
+
tbody tr {
|
234
|
+
//Darkens the non-striped table rows on hover.
|
235
|
+
&:hover {
|
236
|
+
background-color: $table-row-hover;
|
237
|
+
}
|
238
|
+
}
|
239
|
+
|
240
|
+
@if $table-is-striped == true {
|
241
|
+
// Darkens the even striped table rows.
|
242
|
+
@if($table-stripe == even) {
|
243
|
+
&:not(.unstriped) tr:nth-of-type(even):hover {
|
244
|
+
background-color: $table-row-stripe-hover;
|
245
|
+
}
|
246
|
+
}
|
247
|
+
|
248
|
+
// Darkens the odd striped table rows.
|
249
|
+
@elseif($table-stripe == odd) {
|
250
|
+
&:not(.unstriped) tr:nth-of-type(odd):hover {
|
251
|
+
background-color: $table-row-stripe-hover;
|
252
|
+
}
|
253
|
+
}
|
254
|
+
}
|
255
|
+
|
256
|
+
@else if $table-is-striped == false {
|
257
|
+
// Darkens the even striped table rows.
|
258
|
+
@if($table-stripe == even) {
|
259
|
+
&.striped tr:nth-of-type(even):hover {
|
260
|
+
background-color: $table-row-stripe-hover;
|
261
|
+
}
|
262
|
+
}
|
263
|
+
|
264
|
+
// Darkens the odd striped table rows.
|
265
|
+
@elseif($table-stripe == odd) {
|
266
|
+
&.striped tr:nth-of-type(odd):hover {
|
267
|
+
background-color: $table-row-stripe-hover;
|
268
|
+
}
|
269
|
+
}
|
270
|
+
}
|
271
|
+
}
|
272
|
+
|
273
|
+
/// Adds styles for a stacked table. Useful for small-screen layouts.
|
274
|
+
/// @param {Boolean} $header [$show-header-for-stacked] - Show the first th of header when stacked.
|
275
|
+
@mixin table-stack($header: $show-header-for-stacked) {
|
276
|
+
@if $header {
|
277
|
+
thead {
|
278
|
+
th {
|
279
|
+
display: block;
|
280
|
+
}
|
281
|
+
}
|
282
|
+
}
|
283
|
+
@else {
|
284
|
+
thead {
|
285
|
+
display: none;
|
286
|
+
}
|
287
|
+
}
|
288
|
+
|
289
|
+
tfoot {
|
290
|
+
display: none;
|
291
|
+
}
|
292
|
+
|
293
|
+
tr,
|
294
|
+
th,
|
295
|
+
td {
|
296
|
+
display: block;
|
297
|
+
}
|
298
|
+
|
299
|
+
td {
|
300
|
+
border-top: 0;
|
301
|
+
}
|
302
|
+
}
|
303
|
+
|
304
|
+
@mixin foundation-table($nest: false) {
|
305
|
+
table {
|
306
|
+
@include table($nest: $nest);
|
307
|
+
}
|
308
|
+
|
309
|
+
table.stack {
|
310
|
+
@include breakpoint($table-stack-breakpoint down) {
|
311
|
+
@include table-stack;
|
312
|
+
}
|
313
|
+
}
|
314
|
+
|
315
|
+
table.scroll {
|
316
|
+
@include table-scroll;
|
317
|
+
}
|
318
|
+
|
319
|
+
table.hover {
|
320
|
+
@include table-hover;
|
321
|
+
}
|
322
|
+
|
323
|
+
.table-scroll {
|
324
|
+
overflow-x: auto;
|
325
|
+
|
326
|
+
table {
|
327
|
+
width: auto;
|
328
|
+
}
|
329
|
+
}
|
330
|
+
}
|