foundation-rails 5.2.3.0 → 5.3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bower.json +2 -2
- data/lib/foundation/rails/version.rb +1 -1
- data/test/dummy/.ruby-version +1 -0
- data/vendor/assets/_settings.scss +1298 -0
- data/vendor/assets/javascripts/foundation/foundation.abide.js +4 -4
- data/vendor/assets/javascripts/foundation/foundation.accordion.js +7 -1
- data/vendor/assets/javascripts/foundation/foundation.alert.js +3 -3
- data/vendor/assets/javascripts/foundation/foundation.clearing.js +17 -9
- data/vendor/assets/javascripts/foundation/foundation.dropdown.js +7 -5
- data/vendor/assets/javascripts/foundation/foundation.equalizer.js +2 -2
- data/vendor/assets/javascripts/foundation/foundation.interchange.js +24 -11
- data/vendor/assets/javascripts/foundation/foundation.joyride.js +14 -11
- data/vendor/assets/javascripts/foundation/foundation.js +6 -4
- data/vendor/assets/javascripts/foundation/foundation.magellan.js +5 -3
- data/vendor/assets/javascripts/foundation/foundation.offcanvas.js +2 -2
- data/vendor/assets/javascripts/foundation/foundation.orbit.js +123 -261
- data/vendor/assets/javascripts/foundation/foundation.reveal.js +15 -15
- data/vendor/assets/javascripts/foundation/foundation.slider.js +51 -24
- data/vendor/assets/javascripts/foundation/foundation.topbar.js +13 -12
- data/vendor/assets/javascripts/vendor/modernizr.js +3 -3
- data/vendor/assets/stylesheets/foundation.scss +2 -1
- data/vendor/assets/stylesheets/foundation/_settings.scss +19 -10
- data/vendor/assets/stylesheets/foundation/components/_accordion.scss +115 -1
- data/vendor/assets/stylesheets/foundation/components/_block-grid.scss +2 -2
- data/vendor/assets/stylesheets/foundation/components/_button-groups.scss +9 -1
- data/vendor/assets/stylesheets/foundation/components/_forms.scss +8 -6
- data/vendor/assets/stylesheets/foundation/components/_global.scss +12 -7
- data/vendor/assets/stylesheets/foundation/components/_grid.scss +17 -4
- data/vendor/assets/stylesheets/foundation/components/_icon-bar.scss +229 -0
- data/vendor/assets/stylesheets/foundation/components/_iconbar.scss +67 -0
- data/vendor/assets/stylesheets/foundation/components/_offcanvas.scss +18 -16
- data/vendor/assets/stylesheets/foundation/components/_orbit.scss +84 -139
- data/vendor/assets/stylesheets/foundation/components/_panels.scss +6 -3
- data/vendor/assets/stylesheets/foundation/components/_range-slider.scss +20 -5
- data/vendor/assets/stylesheets/foundation/components/_reveal-new.scss +0 -0
- data/vendor/assets/stylesheets/foundation/components/_side-nav.scss +1 -1
- data/vendor/assets/stylesheets/foundation/components/_switches.scss +215 -0
- data/vendor/assets/stylesheets/foundation/components/_tabs.scss +1 -1
- data/vendor/assets/stylesheets/foundation/components/_toolbar.scss +67 -0
- data/vendor/assets/stylesheets/foundation/components/_tooltips.scss +2 -1
- data/vendor/assets/stylesheets/foundation/components/_top-bar.scss +26 -11
- data/vendor/assets/stylesheets/foundation/components/_type.scss +2 -0
- metadata +10 -3
- data/vendor/assets/stylesheets/foundation/components/_switch.scss +0 -294
@@ -1,294 +0,0 @@
|
|
1
|
-
// Foundation by ZURB
|
2
|
-
// foundation.zurb.com
|
3
|
-
// Licensed under MIT Open Source
|
4
|
-
|
5
|
-
@import "global";
|
6
|
-
|
7
|
-
//
|
8
|
-
// @name
|
9
|
-
// @dependencies _global.scss
|
10
|
-
//
|
11
|
-
|
12
|
-
//
|
13
|
-
// @variables
|
14
|
-
//
|
15
|
-
|
16
|
-
// NOTE: Switches have been deprecated in Foundation 5 and will be removed in the future.
|
17
|
-
|
18
|
-
$include-html-form-classes: $include-html-classes !default;
|
19
|
-
|
20
|
-
// Controlling border styles and background colors for the switch container
|
21
|
-
$switch-border-color: scale-color(#fff, $lightness: -20%) !default;
|
22
|
-
$switch-border-style: solid !default;
|
23
|
-
$switch-border-width: 1px !default;
|
24
|
-
$switch-bg: #fff !default;
|
25
|
-
|
26
|
-
// We use these to control the switch heights for our default classes
|
27
|
-
$switch-height-tny: 22px !default;
|
28
|
-
$switch-height-sml: 28px !default;
|
29
|
-
$switch-height-med: 36px !default;
|
30
|
-
$switch-height-lrg: 44px !default;
|
31
|
-
$switch-bottom-margin: rem-calc(20) !default;
|
32
|
-
|
33
|
-
// We use these to control default font sizes for our classes.
|
34
|
-
$switch-font-size-tny: 11px !default;
|
35
|
-
$switch-font-size-sml: 12px !default;
|
36
|
-
$switch-font-size-med: 14px !default;
|
37
|
-
$switch-font-size-lrg: 17px !default;
|
38
|
-
$switch-label-side-padding: 6px !default;
|
39
|
-
|
40
|
-
// We use these to style the switch-paddle
|
41
|
-
$switch-paddle-bg: #fff !default;
|
42
|
-
$switch-paddle-fade-to-color: scale-color($switch-paddle-bg, $lightness: -10%) !default;
|
43
|
-
$switch-paddle-border-color: scale-color($switch-paddle-bg, $lightness: -35%) !default;
|
44
|
-
$switch-paddle-border-width: 1px !default;
|
45
|
-
$switch-paddle-border-style: solid !default;
|
46
|
-
$switch-paddle-transition-speed: .1s !default;
|
47
|
-
$switch-paddle-transition-ease: ease-out !default;
|
48
|
-
$switch-positive-color: scale-color($success-color, $lightness: 94%) !default;
|
49
|
-
$switch-negative-color: #f5f5f5 !default;
|
50
|
-
|
51
|
-
// Outline Style for tabbing through switches
|
52
|
-
$switch-label-outline: 1px dotted #888 !default;
|
53
|
-
|
54
|
-
|
55
|
-
//
|
56
|
-
// @mixins
|
57
|
-
//
|
58
|
-
|
59
|
-
// We use this mixin to create the base styles for our switch element.
|
60
|
-
//
|
61
|
-
// $transition-speed - Time in ms for switch to toggle. Default: $switch-paddle-transition-speed.
|
62
|
-
// $transition-ease - Easing function to use for animation (i.e. ease-out). Default: $switch-paddle-transition-ease.
|
63
|
-
@mixin switch-base(
|
64
|
-
$transition-speed:$switch-paddle-transition-speed,
|
65
|
-
$transition-ease:$switch-paddle-transition-ease) {
|
66
|
-
|
67
|
-
// Default position and structure for switch container.
|
68
|
-
position: relative;
|
69
|
-
padding: 0;
|
70
|
-
display: block;
|
71
|
-
overflow: hidden;
|
72
|
-
border-style: $switch-border-style;
|
73
|
-
border-width: $switch-border-width;
|
74
|
-
margin-bottom: $switch-bottom-margin;
|
75
|
-
|
76
|
-
// Default label styles for type and transition
|
77
|
-
label {
|
78
|
-
position: relative;
|
79
|
-
#{$default-float}: 0;
|
80
|
-
z-index: 2;
|
81
|
-
float: $default-float;
|
82
|
-
width: 50%;
|
83
|
-
height: 100%;
|
84
|
-
margin: 0;
|
85
|
-
font-weight: $font-weight-bold;
|
86
|
-
text-align: $default-float;
|
87
|
-
|
88
|
-
// Transition for the switch label to follow paddle
|
89
|
-
@include single-transition(all, $transition-speed, $transition-ease);
|
90
|
-
}
|
91
|
-
|
92
|
-
// So that we don't need to recreate the form with any JS, we use the
|
93
|
-
// existing radio button, but we cleverly position and hide it.
|
94
|
-
input {
|
95
|
-
position: absolute;
|
96
|
-
z-index: 3;
|
97
|
-
opacity: 0;
|
98
|
-
width: 100%;
|
99
|
-
height: 100%;
|
100
|
-
-moz-appearance: none;
|
101
|
-
|
102
|
-
// Hover and focus styles for the paddle
|
103
|
-
&:hover,
|
104
|
-
&:focus {
|
105
|
-
cursor: $cursor-pointer-value;
|
106
|
-
}
|
107
|
-
}
|
108
|
-
|
109
|
-
// The toggle area for radio switches. We call is a paddle.
|
110
|
-
span:last-child {
|
111
|
-
position: absolute;
|
112
|
-
top: -1px;
|
113
|
-
#{$default-float}: -1px;
|
114
|
-
z-index: 1;
|
115
|
-
display: block;
|
116
|
-
padding: 0;
|
117
|
-
border-width: $switch-paddle-border-width;
|
118
|
-
border-style: $switch-paddle-border-style;
|
119
|
-
|
120
|
-
// Transition for the switch paddle
|
121
|
-
@include single-transition(all, $transition-speed, $transition-ease);
|
122
|
-
}
|
123
|
-
|
124
|
-
// When a label isn't :checked, we hide it as it slides away.
|
125
|
-
input:not(:checked) + label { opacity: 0; }
|
126
|
-
|
127
|
-
// Controlling the position of the labels as they are toggled.
|
128
|
-
input:checked { display: none !important; }
|
129
|
-
input { #{$default-float}: 0; display: block !important; }
|
130
|
-
|
131
|
-
// Left Label alignment and position changes, including fixes for while inside a custom form
|
132
|
-
input:first-of-type + label,
|
133
|
-
input:first-of-type + span + label { #{$default-float}: -50%; }
|
134
|
-
input:first-of-type:checked + label,
|
135
|
-
input:first-of-type:checked + span + label { #{$default-float}: 0%; }
|
136
|
-
|
137
|
-
// Right Label alignment and position changes, including fixes for while inside a custom form
|
138
|
-
input:last-of-type + label,
|
139
|
-
input:last-of-type + span + label {#{$opposite-direction}: -50%; #{$default-float}: auto; text-align: $opposite-direction; }
|
140
|
-
input:last-of-type:checked + label,
|
141
|
-
input:last-of-type:checked + span + label { #{$opposite-direction}: 0%; #{$default-float}: auto; }
|
142
|
-
|
143
|
-
// Hiding custom form spans since we auto-create them
|
144
|
-
span.custom { display: none !important; }
|
145
|
-
|
146
|
-
form.custom & .hidden-field {
|
147
|
-
margin-left: auto;
|
148
|
-
position: absolute;
|
149
|
-
visibility: visible;
|
150
|
-
}
|
151
|
-
}
|
152
|
-
|
153
|
-
// We use this mixin to create the size styles for switches.
|
154
|
-
//
|
155
|
-
// $height - Height (in px) of the switch. Default: $switch-height-med.
|
156
|
-
// $font-size - Font size of text in switch. Default: $switch-font-size-med.
|
157
|
-
// $line-height - Line height of switch. Default: 2.3rem.
|
158
|
-
@mixin switch-size(
|
159
|
-
$height: $switch-height-med,
|
160
|
-
$font-size: $switch-font-size-med,
|
161
|
-
$line-height: 2.3rem) {
|
162
|
-
|
163
|
-
height: rem-calc($height);
|
164
|
-
|
165
|
-
label {
|
166
|
-
padding: rem-calc(0, $switch-label-side-padding);
|
167
|
-
line-height: $line-height;
|
168
|
-
font-size: rem-calc($font-size);
|
169
|
-
}
|
170
|
-
|
171
|
-
input {
|
172
|
-
// Move the paddle to the right position
|
173
|
-
&:first-of-type:checked ~ span:last-child {
|
174
|
-
#{$default-float}: 100%;
|
175
|
-
margin-#{$default-float}: rem-calc(-$height + 1px);
|
176
|
-
}
|
177
|
-
}
|
178
|
-
|
179
|
-
span:last-child {
|
180
|
-
width: rem-calc($height);
|
181
|
-
height: rem-calc($height);
|
182
|
-
}
|
183
|
-
|
184
|
-
}
|
185
|
-
|
186
|
-
// We use this mixin to add color and other fanciness to the switches.
|
187
|
-
//
|
188
|
-
// $paddle-bg - Background of switch paddle. Default: $switch-paddle-bg.
|
189
|
-
// $positive-color - Background color of positive side of switch. Default: $switch-positive-color.
|
190
|
-
// $negative-color - Background color of negative side of switch. Default: $switch-negative-color.
|
191
|
-
// $radius - Radius to apply to switch. Default: false.
|
192
|
-
// $base-style - Apply base styles? Default: true.
|
193
|
-
@mixin switch-style(
|
194
|
-
$paddle-bg:$switch-paddle-bg,
|
195
|
-
$positive-color:$switch-positive-color,
|
196
|
-
$negative-color:$switch-negative-color,
|
197
|
-
$radius:false,
|
198
|
-
$base-style:true) {
|
199
|
-
|
200
|
-
@if $base-style {
|
201
|
-
background: $switch-bg;
|
202
|
-
border-color: $switch-border-color;
|
203
|
-
|
204
|
-
span:last-child {
|
205
|
-
border-color: scale-color($paddle-bg, $lightness: -30%);
|
206
|
-
background: $paddle-bg;
|
207
|
-
background: linear-gradient(to bottom, $paddle-bg 0%, scale-color($paddle-bg, $lightness: -5%) 100%);
|
208
|
-
|
209
|
-
// Building the alternating colored sides of the switch
|
210
|
-
box-shadow: 2px 0 10px 0 rgba(0,0,0,0.07),
|
211
|
-
1000px 0 0 980px $positive-color,
|
212
|
-
-2px 0 10px 0 rgba(0,0,0,0.07),
|
213
|
-
-1000px 0 0 1000px $negative-color;
|
214
|
-
}
|
215
|
-
|
216
|
-
&:hover,
|
217
|
-
&:focus {
|
218
|
-
span:last-child {
|
219
|
-
background: $paddle-bg;
|
220
|
-
background: linear-gradient(to bottom, $paddle-bg 0%, scale-color($paddle-bg, $lightness: -10%) 100%);
|
221
|
-
}
|
222
|
-
}
|
223
|
-
|
224
|
-
&:active { background: transparent; }
|
225
|
-
}
|
226
|
-
|
227
|
-
// Setting up the radius for switches
|
228
|
-
@if $radius == true {
|
229
|
-
@include radius(4px);
|
230
|
-
span:last-child { @include radius(3px); }
|
231
|
-
}
|
232
|
-
@else if $radius {
|
233
|
-
@include radius($radius);
|
234
|
-
span:last-child { @include radius($radius - 1px); }
|
235
|
-
}
|
236
|
-
|
237
|
-
}
|
238
|
-
|
239
|
-
// We use this to quickly create switches with a single mixin
|
240
|
-
//
|
241
|
-
// $transition-speed - Time in ms for switch to toggle. Default: $switch-paddle-transition-speed.
|
242
|
-
// $transition-ease - Easing function to use for animation (i.e. ease-out). Default: $switch-paddle-transition-ease.
|
243
|
-
// $height - Height (in px) of the switch. Default: $switch-height-med.
|
244
|
-
// $font-size - Font size of text in switch. Default: $switch-font-size-med.
|
245
|
-
// $line-height - Line height of switch. Default: 2.3rem.
|
246
|
-
// $paddle-bg - Background of switch paddle. Default: $switch-paddle-bg.
|
247
|
-
// $positive-color - Background color of positive side of switch. Default: $switch-positive-color.
|
248
|
-
// $negative-color - Background color of negative side of switch. Default: $switch-negative-color.
|
249
|
-
// $radius - Radius to apply to switch. Default: false.
|
250
|
-
// $base-style - Apply base styles? Default: true.
|
251
|
-
@mixin switch(
|
252
|
-
$transition-speed: $switch-paddle-transition-speed,
|
253
|
-
$transition-ease: $switch-paddle-transition-ease,
|
254
|
-
$height: $switch-height-med,
|
255
|
-
$font-size: $switch-font-size-med,
|
256
|
-
$line-height: 2.3rem,
|
257
|
-
$paddle-bg: $switch-paddle-bg,
|
258
|
-
$positive-color: $switch-positive-color,
|
259
|
-
$negative-color: $switch-negative-color,
|
260
|
-
$radius:false,
|
261
|
-
$base-style:true) {
|
262
|
-
@include switch-base($transition-speed, $transition-ease);
|
263
|
-
@include switch-size($height, $font-size, $line-height);
|
264
|
-
@include switch-style($paddle-bg, $positive-color, $negative-color, $radius, $base-style);
|
265
|
-
}
|
266
|
-
|
267
|
-
@include exports("switch") {
|
268
|
-
@if $include-html-form-classes {
|
269
|
-
div.switch {
|
270
|
-
@include switch;
|
271
|
-
|
272
|
-
// Large radio switches
|
273
|
-
&.large { @include switch-size($switch-height-lrg, $switch-font-size-lrg); }
|
274
|
-
|
275
|
-
// Small radio switches
|
276
|
-
&.small { @include switch-size($switch-height-sml, $switch-font-size-sml, 2.1rem); }
|
277
|
-
|
278
|
-
// Tiny radio switches
|
279
|
-
&.tiny { @include switch-size($switch-height-tny, $switch-font-size-tny, 1.9rem); }
|
280
|
-
|
281
|
-
// Add a radius to the switch
|
282
|
-
&.radius { @include radius(4px);
|
283
|
-
span:last-child{ @include radius(3px); }
|
284
|
-
}
|
285
|
-
|
286
|
-
// Make the switch completely round, like a pill
|
287
|
-
&.round { @include radius(1000px);
|
288
|
-
span:last-child { @include radius(999px); }
|
289
|
-
label { padding: rem-calc(0 $switch-label-side-padding + 3); }
|
290
|
-
}
|
291
|
-
|
292
|
-
}
|
293
|
-
}
|
294
|
-
}
|