locomotivecms_wagon 2.4.0.rc2 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/generators/foundation/public/javascripts/vendor/foundation.js +10839 -6523
- data/generators/foundation/public/javascripts/vendor/foundation.min.js +5 -3
- data/generators/foundation/public/stylesheets/_settings.scss +455 -115
- data/generators/foundation/public/stylesheets/app.css +0 -3
- data/generators/foundation/public/stylesheets/app.scss +15 -6
- data/generators/foundation/public/stylesheets/foundation.css +4191 -1885
- data/generators/foundation/public/stylesheets/foundation6/_global.scss +106 -54
- data/generators/foundation/public/stylesheets/foundation6/components/_accordion-menu.scss +157 -14
- data/generators/foundation/public/stylesheets/foundation6/components/_accordion.scss +71 -28
- data/generators/foundation/public/stylesheets/foundation6/components/_badge.scss +17 -9
- data/generators/foundation/public/stylesheets/foundation6/components/_breadcrumbs.scss +33 -10
- data/generators/foundation/public/stylesheets/foundation6/components/_button-group.scss +168 -30
- data/generators/foundation/public/stylesheets/foundation6/components/_button.scss +165 -44
- data/generators/foundation/public/stylesheets/foundation6/components/_callout.scss +9 -18
- data/generators/foundation/public/stylesheets/foundation6/components/_card.scss +129 -0
- data/generators/foundation/public/stylesheets/foundation6/components/_close-button.scss +54 -13
- data/generators/foundation/public/stylesheets/foundation6/components/_drilldown.scss +108 -33
- data/generators/foundation/public/stylesheets/foundation6/components/_dropdown-menu.scss +215 -64
- data/generators/foundation/public/stylesheets/foundation6/components/_dropdown.scss +22 -7
- data/generators/foundation/public/stylesheets/foundation6/components/_flex-video.scss +1 -68
- data/generators/foundation/public/stylesheets/foundation6/components/_flex.scss +117 -0
- data/generators/foundation/public/stylesheets/foundation6/components/_float.scss +1 -1
- data/generators/foundation/public/stylesheets/foundation6/components/_label.scss +16 -8
- data/generators/foundation/public/stylesheets/foundation6/components/_media-object.scss +50 -10
- data/generators/foundation/public/stylesheets/foundation6/components/_menu-icon.scss +9 -0
- data/generators/foundation/public/stylesheets/foundation6/components/_menu.scss +373 -91
- data/generators/foundation/public/stylesheets/foundation6/components/_off-canvas.scss +418 -83
- data/generators/foundation/public/stylesheets/foundation6/components/_orbit.scss +17 -7
- data/generators/foundation/public/stylesheets/foundation6/components/_pagination.scss +77 -45
- data/generators/foundation/public/stylesheets/foundation6/components/_progress-bar.scss +16 -35
- data/generators/foundation/public/stylesheets/foundation6/components/_responsive-embed.scss +70 -0
- data/generators/foundation/public/stylesheets/foundation6/components/_reveal.scss +59 -34
- data/generators/foundation/public/stylesheets/foundation6/components/_slider.scss +17 -38
- data/generators/foundation/public/stylesheets/foundation6/components/_sticky.scss +5 -4
- data/generators/foundation/public/stylesheets/foundation6/components/_switch.scss +52 -36
- data/generators/foundation/public/stylesheets/foundation6/components/_table.scss +197 -79
- data/generators/foundation/public/stylesheets/foundation6/components/_tabs.scss +126 -67
- data/generators/foundation/public/stylesheets/foundation6/components/_thumbnail.scss +17 -4
- data/generators/foundation/public/stylesheets/foundation6/components/_title-bar.scss +61 -21
- data/generators/foundation/public/stylesheets/foundation6/components/_tooltip.scss +74 -24
- data/generators/foundation/public/stylesheets/foundation6/components/_top-bar.scss +128 -10
- data/generators/foundation/public/stylesheets/foundation6/components/_visibility.scss +6 -5
- data/generators/foundation/public/stylesheets/foundation6/forms/_checkbox.scss +14 -9
- data/generators/foundation/public/stylesheets/foundation6/forms/_error.scss +12 -5
- data/generators/foundation/public/stylesheets/foundation6/forms/_fieldset.scss +6 -6
- data/generators/foundation/public/stylesheets/foundation6/forms/_forms.scss +11 -9
- data/generators/foundation/public/stylesheets/foundation6/forms/_help-text.scss +1 -1
- data/generators/foundation/public/stylesheets/foundation6/forms/_input-group.scss +82 -10
- data/generators/foundation/public/stylesheets/foundation6/forms/_label.scss +2 -0
- data/generators/foundation/public/stylesheets/foundation6/forms/_meter.scss +116 -0
- data/generators/foundation/public/stylesheets/foundation6/forms/_progress.scss +94 -0
- data/generators/foundation/public/stylesheets/foundation6/forms/_range.scss +149 -0
- data/generators/foundation/public/stylesheets/foundation6/forms/_select.scss +36 -14
- data/generators/foundation/public/stylesheets/foundation6/forms/_text.scss +53 -27
- data/generators/foundation/public/stylesheets/foundation6/foundation.scss +59 -17
- data/generators/foundation/public/stylesheets/foundation6/grid/_classes.scss +100 -56
- data/generators/foundation/public/stylesheets/foundation6/grid/_column.scss +22 -22
- data/generators/foundation/public/stylesheets/foundation6/grid/_flex-grid.scss +164 -96
- data/generators/foundation/public/stylesheets/foundation6/grid/_grid.scss +19 -4
- data/generators/foundation/public/stylesheets/foundation6/grid/_gutter.scss +61 -10
- data/generators/foundation/public/stylesheets/foundation6/grid/_layout.scss +49 -5
- data/generators/foundation/public/stylesheets/foundation6/grid/_position.scss +14 -9
- data/generators/foundation/public/stylesheets/foundation6/grid/_row.scss +42 -15
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/_classes.scss +11 -4
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/effects/_fade.scss +4 -1
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/effects/_zoom.scss +1 -1
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/transitions/_slide.scss +1 -1
- data/generators/foundation/public/stylesheets/foundation6/motion-ui/util/_transition.scss +1 -1
- data/generators/foundation/public/stylesheets/foundation6/prototype/_arrow.scss +36 -0
- data/generators/foundation/public/stylesheets/foundation6/prototype/_border-box.scss +35 -0
- data/generators/foundation/public/stylesheets/foundation6/prototype/_border-none.scss +35 -0
- data/generators/foundation/public/stylesheets/foundation6/prototype/_bordered.scss +54 -0
- data/generators/foundation/public/stylesheets/foundation6/prototype/_box.scss +23 -0
- data/generators/foundation/public/stylesheets/foundation6/prototype/_display.scss +50 -0
- data/generators/foundation/public/stylesheets/foundation6/prototype/_font-styling.scss +95 -0
- data/generators/foundation/public/stylesheets/foundation6/prototype/_list-style-type.scss +95 -0
- data/generators/foundation/public/stylesheets/foundation6/prototype/_overflow.scss +72 -0
- data/generators/foundation/public/stylesheets/foundation6/prototype/_position.scss +114 -0
- data/generators/foundation/public/stylesheets/foundation6/prototype/_prototype.scss +87 -0
- data/generators/foundation/public/stylesheets/foundation6/prototype/_relation.scss +157 -0
- data/generators/foundation/public/stylesheets/foundation6/prototype/_rotate.scss +31 -0
- data/generators/foundation/public/stylesheets/foundation6/prototype/_rounded.scss +54 -0
- data/generators/foundation/public/stylesheets/foundation6/prototype/_separator.scss +96 -0
- data/generators/foundation/public/stylesheets/foundation6/prototype/_shadow.scss +43 -0
- data/generators/foundation/public/stylesheets/foundation6/prototype/_sizing.scss +73 -0
- data/generators/foundation/public/stylesheets/foundation6/prototype/_spacing.scss +204 -0
- data/generators/foundation/public/stylesheets/foundation6/prototype/_text-decoration.scss +48 -0
- data/generators/foundation/public/stylesheets/foundation6/prototype/_text-transformation.scss +48 -0
- data/generators/foundation/public/stylesheets/foundation6/prototype/_text-utilities.scss +88 -0
- data/generators/foundation/public/stylesheets/foundation6/settings/_settings.scss +454 -116
- data/generators/foundation/public/stylesheets/foundation6/typography/_alignment.scss +9 -8
- data/generators/foundation/public/stylesheets/foundation6/typography/_base.scss +128 -55
- data/generators/foundation/public/stylesheets/foundation6/typography/_helpers.scss +7 -4
- data/generators/foundation/public/stylesheets/foundation6/typography/_print.scss +22 -9
- data/generators/foundation/public/stylesheets/foundation6/typography/_typography.scss +0 -2
- data/generators/foundation/public/stylesheets/foundation6/util/_breakpoint.scss +213 -47
- data/generators/foundation/public/stylesheets/foundation6/util/_color.scss +105 -17
- data/generators/foundation/public/stylesheets/foundation6/util/_direction.scss +31 -0
- data/generators/foundation/public/stylesheets/foundation6/util/_flex.scss +85 -0
- data/generators/foundation/public/stylesheets/foundation6/util/_math.scss +72 -0
- data/generators/foundation/public/stylesheets/foundation6/util/_mixins.scss +161 -38
- data/generators/foundation/public/stylesheets/foundation6/util/_selector.scss +5 -3
- data/generators/foundation/public/stylesheets/foundation6/util/_typography.scss +26 -0
- data/generators/foundation/public/stylesheets/foundation6/util/_unit.scss +100 -17
- data/generators/foundation/public/stylesheets/foundation6/util/_util.scss +4 -5
- data/generators/foundation/public/stylesheets/foundation6/util/_value.scss +68 -25
- data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/_normalize.scss +3 -0
- data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/normalize/_import-now.scss +11 -0
- data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/normalize/_normalize-mixin.scss +676 -0
- data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/normalize/_variables.scss +36 -0
- data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/normalize/_vertical-rhythm.scss +61 -0
- data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_contain.scss +31 -0
- data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_purge.scss +38 -0
- data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_remove.scss +31 -0
- data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_replace.scss +46 -0
- data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_to-list.scss +27 -0
- data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/helpers/_missing-dependencies.scss +25 -0
- data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/helpers/_true.scss +13 -0
- data/generators/foundation/public/stylesheets/foundation6/xy-grid/_cell.scss +169 -0
- data/generators/foundation/public/stylesheets/foundation6/xy-grid/_classes.scss +476 -0
- data/generators/foundation/public/stylesheets/foundation6/xy-grid/_collapse.scss +74 -0
- data/generators/foundation/public/stylesheets/foundation6/xy-grid/_frame.scss +85 -0
- data/generators/foundation/public/stylesheets/foundation6/xy-grid/_grid.scss +35 -0
- data/generators/foundation/public/stylesheets/foundation6/xy-grid/_gutters.scss +45 -0
- data/generators/foundation/public/stylesheets/foundation6/xy-grid/_layout.scss +33 -0
- data/generators/foundation/public/stylesheets/foundation6/xy-grid/_position.scss +28 -0
- data/generators/foundation/public/stylesheets/foundation6/xy-grid/_xy-grid.scss +51 -0
- data/lib/locomotive/wagon/tools/styled_yaml.rb +1 -1
- data/lib/locomotive/wagon/version.rb +1 -1
- data/locomotivecms_wagon.gemspec +2 -2
- data/spec/fixtures/cassettes/authenticate.yml +102 -48
- data/spec/fixtures/cassettes/delete.yml +519 -259
- data/spec/fixtures/cassettes/push.yml +2724 -1486
- metadata +61 -10
- data/generators/foundation/public/stylesheets/foundation6/motion-ui.scss +0 -4
- data/generators/foundation/public/stylesheets/foundation6/vendor/normalize.scss +0 -424
@@ -9,43 +9,11 @@
|
|
9
9
|
/// @group slider
|
10
10
|
////
|
11
11
|
|
12
|
-
/// Default
|
12
|
+
/// Default slider width of a vertical slider. (Doesn't apply to the native slider.)
|
13
13
|
/// @type Number
|
14
|
-
$slider-
|
14
|
+
$slider-width-vertical: 0.5rem !default;
|
15
15
|
|
16
|
-
///
|
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.
|
16
|
+
/// Transition properties to apply to the slider handle and fill. (Doesn't apply to the native slider.)
|
49
17
|
/// @type Transition
|
50
18
|
$slider-transition: all 0.2s ease-in-out !default;
|
51
19
|
|
@@ -55,6 +23,7 @@ $slider-transition: all 0.2s ease-in-out !default;
|
|
55
23
|
height: $slider-height;
|
56
24
|
margin-top: 1.25rem;
|
57
25
|
margin-bottom: 2.25rem;
|
26
|
+
|
58
27
|
background-color: $slider-background;
|
59
28
|
cursor: pointer;
|
60
29
|
user-select: none;
|
@@ -66,9 +35,11 @@ $slider-transition: all 0.2s ease-in-out !default;
|
|
66
35
|
position: absolute;
|
67
36
|
top: 0;
|
68
37
|
left: 0;
|
38
|
+
|
69
39
|
display: inline-block;
|
70
40
|
max-width: 100%;
|
71
41
|
height: $slider-height;
|
42
|
+
|
72
43
|
background-color: $slider-fill-background;
|
73
44
|
transition: $slider-transition;
|
74
45
|
|
@@ -80,17 +51,18 @@ $slider-transition: all 0.2s ease-in-out !default;
|
|
80
51
|
/// Adds the general styles for the slider handles.
|
81
52
|
@mixin slider-handle {
|
82
53
|
@include disable-mouse-outline;
|
83
|
-
@include
|
84
|
-
position: absolute;
|
54
|
+
@include vertical-center;
|
85
55
|
left: 0;
|
86
56
|
z-index: 1;
|
57
|
+
|
87
58
|
display: inline-block;
|
88
59
|
width: $slider-handle-width;
|
89
60
|
height: $slider-handle-height;
|
61
|
+
|
62
|
+
border-radius: $slider-radius;
|
90
63
|
background-color: $slider-handle-background;
|
91
64
|
transition: $slider-transition;
|
92
65
|
touch-action: manipulation;
|
93
|
-
border-radius: $slider-radius;
|
94
66
|
|
95
67
|
&:hover {
|
96
68
|
background-color: scale-color($slider-handle-background, $lightness: -15%);
|
@@ -155,4 +127,11 @@ $slider-transition: all 0.2s ease-in-out !default;
|
|
155
127
|
.slider.vertical {
|
156
128
|
@include slider-vertical;
|
157
129
|
}
|
130
|
+
|
131
|
+
// RTL support
|
132
|
+
@if $global-text-direction == rtl {
|
133
|
+
.slider:not(.vertical) {
|
134
|
+
transform: scale(-1, 1);
|
135
|
+
}
|
136
|
+
}
|
158
137
|
}
|
@@ -8,14 +8,15 @@
|
|
8
8
|
}
|
9
9
|
|
10
10
|
.sticky {
|
11
|
-
position:
|
11
|
+
position: relative;
|
12
12
|
z-index: 0;
|
13
|
-
transform: translate3d(0,0,0);
|
13
|
+
transform: translate3d(0, 0, 0);
|
14
14
|
}
|
15
15
|
|
16
16
|
.sticky.is-stuck {
|
17
17
|
position: fixed;
|
18
18
|
z-index: 5;
|
19
|
+
width: 100%;
|
19
20
|
|
20
21
|
&.is-at-top {
|
21
22
|
top: 0;
|
@@ -27,9 +28,9 @@
|
|
27
28
|
}
|
28
29
|
|
29
30
|
.sticky.is-anchored {
|
30
|
-
position:
|
31
|
-
left: auto;
|
31
|
+
position: relative;
|
32
32
|
right: auto;
|
33
|
+
left: auto;
|
33
34
|
|
34
35
|
&.is-at-bottom {
|
35
36
|
bottom: 0;
|
@@ -32,7 +32,7 @@ $switch-height-large: 2.5rem !default;
|
|
32
32
|
|
33
33
|
/// Border radius of the switch
|
34
34
|
/// @type Number
|
35
|
-
$switch-radius: $global-radius;
|
35
|
+
$switch-radius: $global-radius !default;
|
36
36
|
|
37
37
|
/// border around a modal.
|
38
38
|
/// @type Number
|
@@ -60,37 +60,46 @@ $switch-paddle-transition: all 0.25s ease-out !default;
|
|
60
60
|
|
61
61
|
/// Adds styles for a switch container. Apply this to a container class.
|
62
62
|
@mixin switch-container {
|
63
|
+
position: relative;
|
63
64
|
margin-bottom: $switch-margin;
|
64
65
|
outline: 0;
|
65
|
-
position: relative;
|
66
|
-
user-select: none;
|
67
66
|
|
68
67
|
// These properties cascade down to the switch text
|
69
|
-
color: $white;
|
70
|
-
font-weight: bold;
|
71
68
|
font-size: rem-calc(14);
|
69
|
+
font-weight: bold;
|
70
|
+
color: $white;
|
71
|
+
|
72
|
+
user-select: none;
|
72
73
|
}
|
73
74
|
|
74
75
|
/// Adds styles for a switch input. Apply this to an `<input>` within a switch.
|
75
76
|
@mixin switch-input {
|
76
|
-
opacity: 0;
|
77
77
|
position: absolute;
|
78
|
+
margin-bottom: 0;
|
79
|
+
opacity: 0;
|
78
80
|
}
|
79
81
|
|
80
82
|
/// Adds styles for the background and paddle of a switch. Apply this to a `<label>` within a switch.
|
81
83
|
@mixin switch-paddle {
|
82
|
-
|
83
|
-
|
84
|
-
|
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
|
+
|
85
89
|
position: relative;
|
86
|
-
|
90
|
+
display: block;
|
91
|
+
width: $switch-width;
|
87
92
|
height: $switch-height;
|
88
|
-
|
93
|
+
|
89
94
|
border-radius: $switch-radius;
|
95
|
+
background: $switch-background;
|
96
|
+
transition: $switch-paddle-transition;
|
90
97
|
|
91
98
|
// Resetting these <label> presets so type styles cascade down
|
92
|
-
color: inherit;
|
93
99
|
font-weight: inherit;
|
100
|
+
color: inherit;
|
101
|
+
|
102
|
+
cursor: pointer;
|
94
103
|
|
95
104
|
// Needed to override specificity
|
96
105
|
input + & {
|
@@ -99,16 +108,19 @@ $switch-paddle-transition: all 0.25s ease-out !default;
|
|
99
108
|
|
100
109
|
// The paddle itself
|
101
110
|
&::after {
|
102
|
-
background: $switch-paddle-background;
|
103
|
-
content: '';
|
104
|
-
display: block;
|
105
111
|
position: absolute;
|
106
|
-
|
107
|
-
#{$global-left}:
|
108
|
-
|
109
|
-
|
110
|
-
|
112
|
+
top: $switch-paddle-offset;
|
113
|
+
#{$global-left}: $switch-paddle-offset;
|
114
|
+
|
115
|
+
display: block;
|
116
|
+
width: $paddle-width;
|
117
|
+
height: $paddle-height;
|
118
|
+
|
111
119
|
transform: translate3d(0, 0, 0);
|
120
|
+
border-radius: $switch-paddle-radius;
|
121
|
+
background: $switch-paddle-background;
|
122
|
+
transition: $switch-paddle-transition;
|
123
|
+
content: '';
|
112
124
|
}
|
113
125
|
|
114
126
|
// Change the visual style when the switch is active
|
@@ -116,7 +128,7 @@ $switch-paddle-transition: all 0.25s ease-out !default;
|
|
116
128
|
background: $switch-background-active;
|
117
129
|
|
118
130
|
&::after {
|
119
|
-
#{$global-left}:
|
131
|
+
#{$global-left}: $paddle-active-offest;
|
120
132
|
}
|
121
133
|
}
|
122
134
|
|
@@ -153,39 +165,43 @@ $switch-paddle-transition: all 0.25s ease-out !default;
|
|
153
165
|
|
154
166
|
/// Changes the size of a switch by modifying the size of the body and paddle. Apply this to a switch container.
|
155
167
|
/// @param {Number} $font-size [1rem] - Font size of label text within the switch.
|
156
|
-
/// @param {Number} $
|
157
|
-
/// @param {Number} $height [2rem] - Height of the switch body.
|
158
|
-
/// @param {Number} $paddle-width [1.5rem] - Width of the switch paddle.
|
168
|
+
/// @param {Number} $switch-height [2rem] - Height of the switch body.
|
159
169
|
/// @param {Number} $paddle-offset [0.25rem] - Spacing between the switch paddle and the edge of the switch body.
|
160
170
|
@mixin switch-size(
|
161
171
|
$font-size: 1rem,
|
162
|
-
$
|
163
|
-
$height: 2rem,
|
164
|
-
$paddle-width: 1.5rem,
|
172
|
+
$switch-height: 2rem,
|
165
173
|
$paddle-offset: 0.25rem
|
166
174
|
) {
|
167
|
-
|
168
|
-
$
|
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;
|
169
182
|
|
170
183
|
.switch-paddle {
|
171
|
-
width: $width;
|
172
|
-
height: $height;
|
184
|
+
width: $switch-width;
|
185
|
+
height: $switch-height;
|
173
186
|
font-size: $font-size;
|
174
187
|
}
|
175
188
|
|
176
189
|
.switch-paddle::after {
|
190
|
+
top: $paddle-offset;
|
191
|
+
#{$global-left}: $paddle-offset;
|
177
192
|
width: $paddle-width;
|
178
193
|
height: $paddle-height;
|
179
194
|
}
|
180
195
|
|
181
|
-
input:checked ~ .switch-paddle
|
182
|
-
#{$global-left}: $paddle-
|
196
|
+
input:checked ~ .switch-paddle::after {
|
197
|
+
#{$global-left}: $paddle-active-offest;
|
183
198
|
}
|
184
199
|
}
|
185
200
|
|
186
201
|
@mixin foundation-switch {
|
187
202
|
// Container class
|
188
203
|
.switch {
|
204
|
+
height: $switch-height;
|
189
205
|
@include switch-container;
|
190
206
|
}
|
191
207
|
|
@@ -218,14 +234,14 @@ $switch-paddle-transition: all 0.25s ease-out !default;
|
|
218
234
|
|
219
235
|
// Switch sizes
|
220
236
|
.switch.tiny {
|
221
|
-
@include switch-size(rem-calc(10),
|
237
|
+
@include switch-size(rem-calc(10), $switch-height-tiny, $switch-paddle-offset);
|
222
238
|
}
|
223
239
|
|
224
240
|
.switch.small {
|
225
|
-
@include switch-size(rem-calc(12),
|
241
|
+
@include switch-size(rem-calc(12), $switch-height-small, $switch-paddle-offset);
|
226
242
|
}
|
227
243
|
|
228
244
|
.switch.large {
|
229
|
-
@include switch-size(rem-calc(16),
|
245
|
+
@include switch-size(rem-calc(16), $switch-height-large, $switch-paddle-offset);
|
230
246
|
}
|
231
247
|
}
|
@@ -2,155 +2,268 @@
|
|
2
2
|
// foundation.zurb.com
|
3
3
|
// Licensed under MIT Open Source
|
4
4
|
|
5
|
-
//
|
5
|
+
// sass-lint:disable force-element-nesting, no-qualifying-elements
|
6
6
|
|
7
7
|
////
|
8
8
|
/// @group table
|
9
9
|
////
|
10
10
|
|
11
|
-
///
|
11
|
+
/// Default color for table background.
|
12
12
|
/// @type Color
|
13
13
|
$table-background: $white !default;
|
14
14
|
|
15
|
-
///
|
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
|
-
///
|
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
|
-
///
|
23
|
+
/// Default padding for table.
|
24
24
|
/// @type Number
|
25
25
|
$table-padding: rem-calc(8 10 10) !default;
|
26
26
|
|
27
|
-
///
|
27
|
+
/// Default scale for darkening the table rows on hover.
|
28
28
|
/// @type Number
|
29
29
|
$table-hover-scale: 2% !default;
|
30
30
|
|
31
|
-
///
|
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
|
-
///
|
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
|
-
///
|
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.
|
40
44
|
/// @type Color
|
41
45
|
$table-striped-background: smart-scale($table-background, $table-color-scale) !default;
|
42
46
|
|
43
|
-
///
|
44
|
-
/// @type
|
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
|
45
49
|
$table-stripe: even !default;
|
46
50
|
|
47
|
-
///
|
51
|
+
/// Default color for header background.
|
48
52
|
/// @type Color
|
49
53
|
$table-head-background: smart-scale($table-background, $table-color-scale / 2) !default;
|
50
54
|
|
51
|
-
///
|
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.
|
52
60
|
/// @type Color
|
53
61
|
$table-foot-background: smart-scale($table-background, $table-color-scale) !default;
|
54
62
|
|
55
|
-
///
|
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.
|
56
68
|
/// @type Color
|
57
69
|
$table-head-font-color: $body-font-color !default;
|
58
70
|
|
59
|
-
///
|
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.
|
60
76
|
/// @type Boolean
|
61
|
-
$show-header-for-stacked: false;
|
77
|
+
$show-header-for-stacked: false !default;
|
62
78
|
|
63
|
-
///
|
64
|
-
/// @
|
65
|
-
|
66
|
-
margin-bottom: $global-margin;
|
67
|
-
border-radius: $global-radius;
|
79
|
+
/// Breakpoint at which stacked table switches from mobile to desktop view.
|
80
|
+
/// @type Breakpoint
|
81
|
+
$table-stack-breakpoint: medium !default;
|
68
82
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
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
|
+
}
|
75
91
|
}
|
76
92
|
|
77
|
-
//
|
78
|
-
|
79
|
-
|
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 {
|
80
147
|
padding: $table-padding;
|
148
|
+
font-weight: $global-weight-bold;
|
149
|
+
text-align: #{$global-left};
|
81
150
|
}
|
151
|
+
}
|
82
152
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
153
|
+
// Table rows
|
154
|
+
tbody {
|
155
|
+
th,
|
156
|
+
td {
|
157
|
+
padding: $table-padding;
|
158
|
+
}
|
159
|
+
}
|
88
160
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
161
|
+
// If tables are striped
|
162
|
+
@if $is-striped == true {
|
163
|
+
tbody {
|
164
|
+
@include -zf-table-stripe($stripe);
|
165
|
+
}
|
93
166
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
font-weight: $global-weight-bold;
|
99
|
-
text-align: #{$global-left};
|
167
|
+
&.unstriped {
|
168
|
+
tbody {
|
169
|
+
@include -zf-table-unstripe();
|
170
|
+
background-color: $table-background;
|
100
171
|
}
|
101
172
|
}
|
173
|
+
}
|
102
174
|
|
103
|
-
|
175
|
+
// If tables are not striped
|
176
|
+
@else if $is-striped == false {
|
104
177
|
tbody {
|
105
|
-
|
106
|
-
|
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
|
-
}
|
178
|
+
@include -zf-table-unstripe();
|
179
|
+
}
|
120
180
|
|
121
|
-
|
122
|
-
|
123
|
-
|
181
|
+
&.striped {
|
182
|
+
tbody {
|
183
|
+
@include -zf-table-stripe($stripe);
|
124
184
|
}
|
125
185
|
}
|
126
186
|
}
|
127
187
|
}
|
128
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
|
+
|
129
210
|
/// Adds the ability to horizontally scroll the table when the content overflows horizontally.
|
130
211
|
@mixin table-scroll {
|
131
212
|
display: block;
|
132
213
|
width: 100%;
|
133
|
-
overflow-
|
214
|
+
overflow-x: auto;
|
134
215
|
}
|
135
216
|
|
136
217
|
/// Slightly darkens the table rows on hover.
|
137
218
|
@mixin table-hover {
|
138
|
-
tr {
|
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 {
|
139
234
|
//Darkens the non-striped table rows on hover.
|
140
235
|
&:hover {
|
141
236
|
background-color: $table-row-hover;
|
142
237
|
}
|
238
|
+
}
|
143
239
|
|
144
|
-
|
240
|
+
@if $table-is-striped == true {
|
241
|
+
// Darkens the even striped table rows.
|
145
242
|
@if($table-stripe == even) {
|
146
|
-
&:nth-of-type(even):hover {
|
243
|
+
&:not(.unstriped) tr:nth-of-type(even):hover {
|
147
244
|
background-color: $table-row-stripe-hover;
|
148
245
|
}
|
149
246
|
}
|
150
247
|
|
151
|
-
//Darkens the odd striped table rows.
|
248
|
+
// Darkens the odd striped table rows.
|
152
249
|
@elseif($table-stripe == odd) {
|
153
|
-
&:nth-of-type(odd):hover {
|
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 {
|
154
267
|
background-color: $table-row-stripe-hover;
|
155
268
|
}
|
156
269
|
}
|
@@ -162,15 +275,12 @@ $show-header-for-stacked: false;
|
|
162
275
|
@mixin table-stack($header: $show-header-for-stacked) {
|
163
276
|
@if $header {
|
164
277
|
thead {
|
165
|
-
th:first-child {
|
166
|
-
display: block;
|
167
|
-
}
|
168
|
-
|
169
278
|
th {
|
170
|
-
display:
|
279
|
+
display: block;
|
171
280
|
}
|
172
281
|
}
|
173
|
-
}
|
282
|
+
}
|
283
|
+
@else {
|
174
284
|
thead {
|
175
285
|
display: none;
|
176
286
|
}
|
@@ -191,13 +301,13 @@ $show-header-for-stacked: false;
|
|
191
301
|
}
|
192
302
|
}
|
193
303
|
|
194
|
-
@mixin foundation-table {
|
304
|
+
@mixin foundation-table($nest: false) {
|
195
305
|
table {
|
196
|
-
@include table;
|
306
|
+
@include table($nest: $nest);
|
197
307
|
}
|
198
308
|
|
199
309
|
table.stack {
|
200
|
-
@include breakpoint(
|
310
|
+
@include breakpoint($table-stack-breakpoint down) {
|
201
311
|
@include table-stack;
|
202
312
|
}
|
203
313
|
}
|
@@ -209,4 +319,12 @@ $show-header-for-stacked: false;
|
|
209
319
|
table.hover {
|
210
320
|
@include table-hover;
|
211
321
|
}
|
322
|
+
|
323
|
+
.table-scroll {
|
324
|
+
overflow-x: auto;
|
325
|
+
|
326
|
+
table {
|
327
|
+
width: auto;
|
328
|
+
}
|
329
|
+
}
|
212
330
|
}
|