foundation-rails 5.1.1.0 → 5.2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +52 -7
  3. data/bower.json +2 -2
  4. data/lib/foundation/rails/version.rb +1 -1
  5. data/vendor/assets/javascripts/foundation/foundation.abide.js +3 -6
  6. data/vendor/assets/javascripts/foundation/foundation.accordion.js +5 -4
  7. data/vendor/assets/javascripts/foundation/foundation.alert.js +1 -1
  8. data/vendor/assets/javascripts/foundation/foundation.clearing.js +70 -34
  9. data/vendor/assets/javascripts/foundation/foundation.dropdown.js +121 -28
  10. data/vendor/assets/javascripts/foundation/foundation.equalizer.js +6 -6
  11. data/vendor/assets/javascripts/foundation/foundation.interchange.js +34 -25
  12. data/vendor/assets/javascripts/foundation/foundation.joyride.js +4 -8
  13. data/vendor/assets/javascripts/foundation/foundation.js +94 -78
  14. data/vendor/assets/javascripts/foundation/foundation.magellan.js +3 -4
  15. data/vendor/assets/javascripts/foundation/foundation.offcanvas.js +19 -1
  16. data/vendor/assets/javascripts/foundation/foundation.orbit.js +151 -102
  17. data/vendor/assets/javascripts/foundation/foundation.reveal.js +43 -15
  18. data/vendor/assets/javascripts/foundation/foundation.slider.js +187 -0
  19. data/vendor/assets/javascripts/foundation/foundation.tab.js +116 -18
  20. data/vendor/assets/javascripts/foundation/foundation.tooltip.js +112 -60
  21. data/vendor/assets/javascripts/foundation/foundation.topbar.js +47 -14
  22. data/vendor/assets/javascripts/vendor/modernizr.js +3 -3
  23. data/vendor/assets/stylesheets/foundation.scss +7 -0
  24. data/vendor/assets/stylesheets/foundation/_functions.scss +4 -0
  25. data/vendor/assets/stylesheets/foundation/_settings.scss +11 -2
  26. data/vendor/assets/stylesheets/foundation/components/_accordion.scss +5 -1
  27. data/vendor/assets/stylesheets/foundation/components/_alert-boxes.scss +4 -0
  28. data/vendor/assets/stylesheets/foundation/components/_block-grid.scss +44 -12
  29. data/vendor/assets/stylesheets/foundation/components/_breadcrumbs.scss +4 -0
  30. data/vendor/assets/stylesheets/foundation/components/_button-groups.scss +4 -0
  31. data/vendor/assets/stylesheets/foundation/components/_buttons.scss +7 -5
  32. data/vendor/assets/stylesheets/foundation/components/_clearing.scss +4 -0
  33. data/vendor/assets/stylesheets/foundation/components/_dropdown-buttons.scss +4 -0
  34. data/vendor/assets/stylesheets/foundation/components/_dropdown.scss +100 -11
  35. data/vendor/assets/stylesheets/foundation/components/_flex-video.scss +4 -0
  36. data/vendor/assets/stylesheets/foundation/components/_forms.scss +25 -21
  37. data/vendor/assets/stylesheets/foundation/components/_global.scss +79 -44
  38. data/vendor/assets/stylesheets/foundation/components/_grid.scss +6 -2
  39. data/vendor/assets/stylesheets/foundation/components/_inline-lists.scss +4 -0
  40. data/vendor/assets/stylesheets/foundation/components/_joyride.scss +4 -0
  41. data/vendor/assets/stylesheets/foundation/components/_keystrokes.scss +5 -1
  42. data/vendor/assets/stylesheets/foundation/components/_labels.scss +4 -0
  43. data/vendor/assets/stylesheets/foundation/components/_magellan.scss +4 -0
  44. data/vendor/assets/stylesheets/foundation/components/_offcanvas.scss +51 -59
  45. data/vendor/assets/stylesheets/foundation/components/_orbit.scss +97 -14
  46. data/vendor/assets/stylesheets/foundation/components/_pagination.scss +7 -2
  47. data/vendor/assets/stylesheets/foundation/components/_panels.scss +5 -1
  48. data/vendor/assets/stylesheets/foundation/components/_pricing-tables.scss +4 -0
  49. data/vendor/assets/stylesheets/foundation/components/_progress-bars.scss +4 -0
  50. data/vendor/assets/stylesheets/foundation/components/_range-slider.scss +148 -0
  51. data/vendor/assets/stylesheets/foundation/components/_reveal.scss +36 -7
  52. data/vendor/assets/stylesheets/foundation/components/_side-nav.scss +8 -3
  53. data/vendor/assets/stylesheets/foundation/components/_split-buttons.scss +4 -0
  54. data/vendor/assets/stylesheets/foundation/components/_sub-nav.scss +6 -2
  55. data/vendor/assets/stylesheets/foundation/components/_switch.scss +4 -0
  56. data/vendor/assets/stylesheets/foundation/components/_tables.scss +4 -0
  57. data/vendor/assets/stylesheets/foundation/components/_tabs.scss +12 -6
  58. data/vendor/assets/stylesheets/foundation/components/_thumbs.scss +4 -0
  59. data/vendor/assets/stylesheets/foundation/components/_tooltips.scss +9 -0
  60. data/vendor/assets/stylesheets/foundation/components/_top-bar.scss +52 -25
  61. data/vendor/assets/stylesheets/foundation/components/_type.scss +132 -75
  62. data/vendor/assets/stylesheets/foundation/components/_visibility.scss +198 -538
  63. data/vendor/assets/stylesheets/normalize.scss +179 -166
  64. metadata +4 -2
@@ -1,3 +1,7 @@
1
+ // Foundation by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
1
5
  @import "global";
2
6
 
3
7
  //
@@ -1,3 +1,7 @@
1
+ // Foundation by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
1
5
  @import "global";
2
6
  @import "buttons";
3
7
 
@@ -53,7 +57,7 @@ $input-prefix-font-color-alt: #fff !default;
53
57
 
54
58
  // We use these to style the error states for inputs and labels
55
59
  $input-error-message-padding: rem-calc(6 9 9) !default;
56
- $input-error-message-top: -1px;
60
+ $input-error-message-top: -1px !default;
57
61
  $input-error-message-font-size: rem-calc(12) !default;
58
62
  $input-error-message-font-weight: normal !default;
59
63
  $input-error-message-font-style: italic !default;
@@ -66,7 +70,7 @@ $glowing-effect-color: $input-focus-border-color !default;
66
70
 
67
71
  // Select variables
68
72
  $select-bg-color: #fafafa !default;
69
-
73
+ $select-hover-bg-color: scale-color($select-bg-color, $lightness: -3%) !default;
70
74
 
71
75
  //
72
76
  // @MIXINS
@@ -129,7 +133,7 @@ $select-bg-color: #fafafa !default;
129
133
  }
130
134
 
131
135
  // Disabled background input background color
132
- &[disabled] { background-color: $input-disabled-bg; }
136
+ &[disabled], fieldset[disabled] & { background-color: $input-disabled-bg; }
133
137
  }
134
138
 
135
139
  // @MIXIN
@@ -248,7 +252,7 @@ $select-bg-color: #fafafa !default;
248
252
 
249
253
  // We use this mixin to style fieldsets
250
254
  @mixin fieldset {
251
- border: $fieldset-border-style $fieldset-border-width $fieldset-border-color;
255
+ border: $fieldset-border-width $fieldset-border-style $fieldset-border-color;
252
256
  padding: $fieldset-padding;
253
257
  margin: $fieldset-margin;
254
258
 
@@ -324,22 +328,17 @@ $select-bg-color: #fafafa !default;
324
328
 
325
329
  select {
326
330
  -webkit-appearance: none !important;
327
- background:
328
- $select-bg-color
329
- url('data:image/svg+xml;base64, PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iM3B4IiB2aWV3Qm94PSIwIDAgNiAzIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA2IDMiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwb2x5Z29uIHBvaW50cz0iNS45OTIsMCAyLjk5MiwzIC0wLjAwOCwwICIvPjwvc3ZnPg==') no-repeat;
330
- background-position-x: 97%;
331
- background-position-y: center;
331
+ background-color: $select-bg-color;
332
+ background-image: url('data:image/svg+xml;base64, PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iM3B4IiB2aWV3Qm94PSIwIDAgNiAzIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA2IDMiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwb2x5Z29uIHBvaW50cz0iNS45OTIsMCAyLjk5MiwzIC0wLjAwOCwwICIvPjwvc3ZnPg==');
333
+ background-repeat: no-repeat;
334
+ background-position: center $opposite-direction 3%;
332
335
  border: $input-border-width $input-border-style $input-border-color;
333
336
  padding: $form-spacing / 2;
334
337
  font-size: $input-font-size;
335
338
  @include radius(0);
336
339
  &.radius { @include radius($global-radius); }
337
340
  &:hover {
338
- background:
339
- scale-color($select-bg-color, $lightness: -3%)
340
- url('data:image/svg+xml;base64, PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iM3B4IiB2aWV3Qm94PSIwIDAgNiAzIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA2IDMiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwb2x5Z29uIHBvaW50cz0iNS45OTIsMCAyLjk5MiwzIC0wLjAwOCwwICIvPjwvc3ZnPg==') no-repeat;
341
- background-position-x: 97%;
342
- background-position-y: center;
341
+ background-color: $select-hover-bg-color;
343
342
  border-color: $input-focus-border-color;
344
343
  }
345
344
  }
@@ -350,7 +349,7 @@ $select-bg-color: #fafafa !default;
350
349
 
351
350
  @-moz-document url-prefix() {
352
351
  select { background: $select-bg-color; }
353
- select:hover { background: scale-color($select-bg-color, $lightness: -3%); }
352
+ select:hover { background: $select-hover-bg-color }
354
353
  }
355
354
  /* Attach elements to the beginning or end of an input */
356
355
  .prefix,
@@ -360,17 +359,17 @@ $select-bg-color: #fafafa !default;
360
359
  .postfix.button { @include button-size(false,false,false); @include postfix(false, false, true); }
361
360
  .prefix.button { @include button-size(false,false,false); @include prefix(false, false, true); }
362
361
 
363
- .prefix.button.radius { @include radius(0); @include side-radius(left, $button-radius); }
364
- .postfix.button.radius { @include radius(0); @include side-radius(right, $button-radius); }
365
- .prefix.button.round { @include radius(0); @include side-radius(left, $button-round); }
366
- .postfix.button.round { @include radius(0); @include side-radius(right, $button-round); }
362
+ .prefix.button.radius { @include radius(0); @include side-radius($default-float, $button-radius); }
363
+ .postfix.button.radius { @include radius(0); @include side-radius($opposite-direction, $button-radius); }
364
+ .prefix.button.round { @include radius(0); @include side-radius($default-float, $button-round); }
365
+ .postfix.button.round { @include radius(0); @include side-radius($opposite-direction, $button-round); }
367
366
 
368
367
  /* Separate prefix and postfix styles when on span or label so buttons keep their own */
369
368
  span.prefix,label.prefix { @include prefix();
370
- &.radius { @include radius(0); @include side-radius(left, $global-radius); }
369
+ &.radius { @include radius(0); @include side-radius($default-float, $global-radius); }
371
370
  }
372
371
  span.postfix,label.postfix { @include postfix();
373
- &.radius { @include radius(0); @include side-radius(right, $global-radius); }
372
+ &.radius { @include radius(0); @include side-radius($opposite-direction, $global-radius); }
374
373
  }
375
374
 
376
375
  /* We use this to get basic styling on all basic form elements */
@@ -397,6 +396,11 @@ $select-bg-color: #fafafa !default;
397
396
  @include radius($input-border-radius);
398
397
  }
399
398
  }
399
+
400
+ /* Respect enforced amount of rows for textarea */
401
+ textarea[rows] {
402
+ height: auto;
403
+ }
400
404
 
401
405
  /* Add height value for select elements to match text input height */
402
406
  select {
@@ -1,3 +1,7 @@
1
+ // Foundation by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
1
5
  @import "../functions";
2
6
  //
3
7
  // Foundation Variables
@@ -42,14 +46,25 @@ $base-line-height: 150% !default;
42
46
  // We use this to create equal side border radius on elements.
43
47
  // $side - Options: left, right, top, bottom
44
48
  @mixin side-radius($side, $radius:$global-radius) {
45
- @if $experimental {
46
- -moz-border-radius-bottom#{$side}: $radius;
47
- -moz-border-radius-top#{$side}: $radius;
48
- -webkit-border-bottom-#{$side}-radius: $radius;
49
- -webkit-border-top-#{$side}-radius: $radius;
50
- }
51
- border-bottom-#{$side}-radius: $radius;
52
- border-top-#{$side}-radius: $radius;
49
+ @if ($side == left or $side == right) {
50
+ @if $experimental {
51
+ -moz-border-radius-bottom#{$side}: $radius;
52
+ -moz-border-radius-top#{$side}: $radius;
53
+ -webkit-border-bottom-#{$side}-radius: $radius;
54
+ -webkit-border-top-#{$side}-radius: $radius;
55
+ }
56
+ border-bottom-#{$side}-radius: $radius;
57
+ border-top-#{$side}-radius: $radius;
58
+ } @else {
59
+ @if $experimental {
60
+ -moz-border-radius-#{$side}left: $radius;
61
+ -moz-border-radius-#{$side}right: $radius;
62
+ -webkit-border-#{$side}-left-radius: $radius;
63
+ -webkit-border-#{$side}-right-radius: $radius;
64
+ }
65
+ border-#{$side}-left-radius: $radius;
66
+ border-#{$side}-right-radius: $radius;
67
+ }
53
68
  }
54
69
 
55
70
  // @mixins
@@ -169,6 +184,29 @@ $base-line-height: 150% !default;
169
184
  transform: translate($horizontal,$vertical)
170
185
  }
171
186
 
187
+ // @mixins
188
+ //
189
+ // Makes an element visually hidden, but accessible.
190
+ // @see http://snook.ca/archives/html_and_css/hiding-content-for-accessibility
191
+ @mixin element-invisible {
192
+ position: absolute !important;
193
+ height: 1px;
194
+ width: 1px;
195
+ overflow: hidden;
196
+ clip: rect(1px, 1px, 1px, 1px);
197
+ }
198
+
199
+ // @mixins
200
+ //
201
+ // Turns off the element-invisible effect.
202
+ @mixin element-invisible-off {
203
+ position: static !important;
204
+ height: auto;
205
+ width: auto;
206
+ overflow: visible;
207
+ clip: auto;
208
+ }
209
+
172
210
  // We use these to control various global styles
173
211
  $body-bg: #fff !default;
174
212
  $body-font-color: #222 !default;
@@ -256,44 +294,45 @@ $cursor-text-value: text !default;
256
294
 
257
295
 
258
296
  @include exports("global") {
259
- meta.foundation-version {
260
- font-family: "/5.1.0/";
261
- }
262
- // Used to provide media query values for javascript components.
263
- // Forward slash placed around everything to convince PhantomJS to read the value.
264
- meta.foundation-mq-small {
265
- font-family: "/" + unquote($small-only) + "/";
266
- width: lower-bound($small-range);
267
- }
268
297
 
269
- meta.foundation-mq-medium {
270
- font-family: "/" + unquote($medium-up) + "/";
271
- width: lower-bound($medium-range);
272
- }
298
+ @if $include-html-global-classes {
273
299
 
274
- meta.foundation-mq-large {
275
- font-family: "/" + unquote($large-up) + "/";
276
- width: lower-bound($large-range);
277
- }
300
+ meta.foundation-version {
301
+ font-family: "/5.2.0/";
302
+ }
303
+ // Used to provide media query values for javascript components.
304
+ // Forward slash placed around everything to convince PhantomJS to read the value.
305
+ meta.foundation-mq-small {
306
+ font-family: "/" + unquote($small-only) + "/";
307
+ width: lower-bound($small-range);
308
+ }
278
309
 
279
- meta.foundation-mq-xlarge {
280
- font-family: "/" + unquote($xlarge-up) + "/";
281
- width: lower-bound($xlarge-range);
282
- }
310
+ meta.foundation-mq-medium {
311
+ font-family: "/" + unquote($medium-up) + "/";
312
+ width: lower-bound($medium-range);
313
+ }
283
314
 
284
- meta.foundation-mq-xxlarge {
285
- font-family: "/" + unquote($xxlarge-up) + "/";
286
- width: lower-bound($xxlarge-range);
287
- }
315
+ meta.foundation-mq-large {
316
+ font-family: "/" + unquote($large-up) + "/";
317
+ width: lower-bound($large-range);
318
+ }
288
319
 
289
- meta.foundation-data-attribute-namespace {
290
- font-family: #{$namespace};
291
- }
320
+ meta.foundation-mq-xlarge {
321
+ font-family: "/" + unquote($xlarge-up) + "/";
322
+ width: lower-bound($xlarge-range);
323
+ }
292
324
 
293
- // Must be 100% for off canvas to work
294
- html, body { height: 100%; }
325
+ meta.foundation-mq-xxlarge {
326
+ font-family: "/" + unquote($xxlarge-up) + "/";
327
+ width: lower-bound($xxlarge-range);
328
+ }
295
329
 
296
- @if $include-html-global-classes {
330
+ meta.foundation-data-attribute-namespace {
331
+ font-family: #{$namespace};
332
+ }
333
+
334
+ // Must be 100% for off canvas to work
335
+ html, body { height: 100%; }
297
336
 
298
337
  // Set box-sizing globally to handle padding and border widths
299
338
  *,
@@ -322,12 +361,8 @@ $cursor-text-value: text !default;
322
361
  a:hover { cursor: $cursor-pointer-value; }
323
362
 
324
363
  // Grid Defaults to get images and embeds to work properly
325
- img,
326
- object,
327
- embed { max-width: 100%; height: auto; }
364
+ img { max-width: 100%; height: auto; }
328
365
 
329
- object,
330
- embed { height: 100%; }
331
366
  img { -ms-interpolation-mode: bicubic; }
332
367
 
333
368
  #map_canvas,
@@ -1,3 +1,7 @@
1
+ // Foundation by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
1
5
  @import "global";
2
6
 
3
7
  //
@@ -136,7 +140,7 @@ $total-columns: 12 !default;
136
140
  @if $center {
137
141
  margin-#{$default-float}: auto;
138
142
  margin-#{$opposite-direction}: auto;
139
- float: none;
143
+ float: none !important;
140
144
  }
141
145
 
142
146
  // If offset, calculate appropriate margins
@@ -205,7 +209,7 @@ $total-columns: 12 !default;
205
209
 
206
210
  &.collapse {
207
211
  > .column,
208
- > .columns { @include grid-column($collapse:true); }
212
+ > .columns { @include grid-column($collapse:true, $float:false); }
209
213
 
210
214
  .row {margin-left:0; margin-right:0;}
211
215
  }
@@ -1,3 +1,7 @@
1
+ // Foundation by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
1
5
  @import "global";
2
6
 
3
7
  //
@@ -1,3 +1,7 @@
1
+ // Foundation by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
1
5
  @import "global";
2
6
 
3
7
  //
@@ -1,3 +1,7 @@
1
+ // Foundation by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
1
5
  @import "global";
2
6
 
3
7
  //
@@ -7,7 +11,7 @@ $include-html-type-classes: $include-html-classes !default;
7
11
 
8
12
  // We use these to control text styles.
9
13
  $keystroke-font: "Consolas", "Menlo", "Courier", monospace !default;
10
- $keystroke-font-size: rem-calc(14) !default;
14
+ $keystroke-font-size: inherit !default;
11
15
  $keystroke-font-color: #222 !default;
12
16
  $keystroke-font-color-alt: #fff !default;
13
17
  $keystroke-function-factor: -7% !default;
@@ -1,3 +1,7 @@
1
+ // Foundation by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
1
5
  @import "global";
2
6
 
3
7
  //
@@ -1,3 +1,7 @@
1
+ // Foundation by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
1
5
  @import "global";
2
6
 
3
7
  //
@@ -1,3 +1,7 @@
1
+ // Foundation by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
1
5
  @import "global";
2
6
  @import "type";
3
7
  @import "top-bar";
@@ -8,21 +12,22 @@ $include-html-off-canvas-classes: $include-html-classes !default;
8
12
  $tabbar-bg: #333 !default;
9
13
  $tabbar-height: rem-calc(45) !default;
10
14
  $tabbar-line-height: $tabbar-height !default;
11
- $tabbar-color: #FFF !default;
15
+ $tabbar-color: #fff !default;
12
16
  $tabbar-middle-padding: 0 rem-calc(10) !default;
13
17
 
14
18
  // Off Canvas Divider Styles
15
- $tabbar-right-section-border: solid 1px scale-color($tabbar-bg, $lightness: 13%) !default;
16
19
  $tabbar-left-section-border: solid 1px scale-color($tabbar-bg, $lightness: -50%) !default;
20
+ $tabbar-right-section-border: $tabbar-left-section-border;
21
+
17
22
 
18
23
  // Off Canvas Tab Bar Headers
19
- $tabbar-header-color: #FFF !default;
24
+ $tabbar-header-color: #fff !default;
20
25
  $tabbar-header-weight: bold !default;
21
26
  $tabbar-header-line-height: $tabbar-height !default;
22
27
  $tabbar-header-margin: 0 !default;
23
28
 
24
29
  // Off Canvas Menu Variables
25
- $off-canvas-width: 250px !default;
30
+ $off-canvas-width: rem-calc(250) !default;
26
31
  $off-canvas-bg: #333 !default;
27
32
 
28
33
  // Off Canvas Menu List Variables
@@ -31,7 +36,7 @@ $off-canvas-label-color: #999 !default;
31
36
  $off-canvas-label-text-transform: uppercase !default;
32
37
  $off-canvas-label-font-weight: bold !default;
33
38
  $off-canvas-label-bg: #444 !default;
34
- $off-canvas-label-border-top: 1px solid scale-color(#444, $lightness: 14%) !default;
39
+ $off-canvas-label-border-top: 1px solid scale-color($off-canvas-label-bg, $lightness: 14%) !default;
35
40
  $off-canvas-label-border-bottom: none !default;
36
41
  $off-canvas-label-margin:0 !default;
37
42
  $off-canvas-link-padding: rem-calc(10, 15) !default;
@@ -77,15 +82,26 @@ $menu-slide: "transform 500ms ease" !default;
77
82
  }
78
83
 
79
84
  // basic styles for off-canvas menu container
80
- @mixin off-canvas-menu {
85
+ @mixin off-canvas-menu($position) {
86
+ @include kill-flicker;
87
+ * { @include kill-flicker; }
81
88
  width: $off-canvas-width;
82
- top:0;
83
- bottom:0;
89
+ top: 0;
90
+ bottom: 0;
84
91
  position: absolute;
85
92
  overflow-y: auto;
86
93
  background: $off-canvas-bg;
87
94
  z-index: 1001;
88
95
  box-sizing: content-box;
96
+ -webkit-overflow-scrolling: touch;
97
+ @if $position == left {
98
+ @include translate3d(-100%,0,0);
99
+ left: 0;
100
+ }
101
+ @if $position == right {
102
+ @include translate3d(100%,0,0);
103
+ right: 0;
104
+ }
89
105
  }
90
106
 
91
107
  // TRANSLATE 3D
@@ -100,7 +116,6 @@ $menu-slide: "transform 500ms ease" !default;
100
116
  // OFF CANVAS WRAP
101
117
  // Wrap visible content and prevent scroll bars
102
118
  @mixin off-canvas-wrap {
103
-
104
119
  @include kill-flicker;
105
120
  @include wrap-base;
106
121
  overflow-x: hidden;
@@ -114,7 +129,6 @@ $menu-slide: "transform 500ms ease" !default;
114
129
  @include kill-flicker;
115
130
  @include wrap-base;
116
131
  @include clearfix;
117
-
118
132
  -webkit-transition: -webkit-#{$menu-slide};
119
133
  -moz-transition: -moz-#{$menu-slide};
120
134
  -ms-transition: -ms-#{$menu-slide};
@@ -149,25 +163,21 @@ $menu-slide: "transform 500ms ease" !default;
149
163
 
150
164
  // SMALL SECTIONS
151
165
  // These are small sections on the left and right that contain the off-canvas toggle buttons;
152
- @mixin tabbar-small-section {
166
+ @mixin tabbar-small-section($position) {
153
167
  width: $tabbar-height;
154
168
  height: $tabbar-height;
155
169
  position: absolute;
156
- top:0;
157
- }
158
-
159
- @mixin left-small-section {
160
- @include tabbar-small-section;
161
- border-right: $tabbar-left-section-border;
162
- box-shadow: 1px 0 0 scale-color($tabbar-bg, $lightness: 13%);
163
- left:0;
164
- }
165
-
166
- @mixin right-small-section {
167
- @include tabbar-small-section;
168
- border-left: $tabbar-right-section-border;
169
- box-shadow: -1px 0 0 scale-color($tabbar-bg, $lightness: -50%);
170
- right:0;
170
+ top: 0;
171
+ @if $position == left {
172
+ border-right: $tabbar-left-section-border;
173
+ // box-shadow: 1px 0 0 scale-color($tabbar-bg, $lightness: 13%);
174
+ left: 0;
175
+ }
176
+ @if $position == right {
177
+ border-left: $tabbar-right-section-border;
178
+ // box-shadow: -1px 0 0 scale-color($tabbar-bg, $lightness: -50%);
179
+ right:0;
180
+ }
171
181
  }
172
182
 
173
183
  @mixin tab-bar-section {
@@ -175,10 +185,8 @@ $menu-slide: "transform 500ms ease" !default;
175
185
  position: absolute;
176
186
  text-align: center;
177
187
  height: $tabbar-height;
178
- top:0;
179
- @media #{$medium-up} {
180
- text-align: left;
181
- }
188
+ top: 0;
189
+ @media #{$medium-up} { text-align: left; }
182
190
 
183
191
  // still need to make these non-presentational
184
192
  &.left {
@@ -218,6 +226,8 @@ $menu-slide: "transform 500ms ease" !default;
218
226
  padding: $off-canvas-link-padding;
219
227
  color: $off-canvas-link-color;
220
228
  border-bottom: $off-canvas-link-border-bottom;
229
+ &:hover { background: scale-color($tabbar-bg, $lightness: -30%); }
230
+ transition: background 300ms ease;
221
231
  }
222
232
  }
223
233
 
@@ -250,23 +260,6 @@ $menu-slide: "transform 500ms ease" !default;
250
260
  }
251
261
  }
252
262
 
253
- // OFF CANVAS MENUS
254
- // These are the containers that contain the off canvas content
255
- @mixin left-off-canvas-menu {
256
- @include kill-flicker;
257
- @include off-canvas-menu;
258
- @include translate3d(-100%,0,0);
259
- left: 0;
260
- * { @include kill-flicker; }
261
- }
262
- @mixin right-off-canvas-menu {
263
- @include kill-flicker;
264
- @include off-canvas-menu;
265
- @include translate3d(100%,0,0);
266
- right: 0;
267
- }
268
-
269
-
270
263
  //
271
264
  // DEFAULT CLASSES
272
265
  //
@@ -276,16 +269,16 @@ $menu-slide: "transform 500ms ease" !default;
276
269
  .off-canvas-wrap { @include off-canvas-wrap; }
277
270
  .inner-wrap { @include inner-wrap; }
278
271
 
279
- nav.tab-bar { @include tab-bar-base; }
272
+ .tab-bar { @include tab-bar-base; }
280
273
 
281
- section.left-small { @include left-small-section; }
282
- section.right-small { @include right-small-section; }
274
+ .left-small { @include tabbar-small-section($position: left); }
275
+ .right-small { @include tabbar-small-section($position: right); }
283
276
 
284
- section.tab-bar-section { @include tab-bar-section; }
277
+ .tab-bar-section { @include tab-bar-section; }
285
278
 
286
279
  // MENU BUTTON
287
280
  // This is a little bonus. You don't need it for off canvas to work. Mixins to be written in the future.
288
- a.menu-icon {
281
+ .tab-bar .menu-icon {
289
282
  text-indent: $tabbar-menu-icon-text-indent;
290
283
  width: $tabbar-height;
291
284
  height: $tabbar-height;
@@ -297,7 +290,6 @@ $menu-slide: "transform 500ms ease" !default;
297
290
 
298
291
  // this is the actual hamburger icon
299
292
  span {
300
-
301
293
  position: absolute;
302
294
  display: block;
303
295
  width: $tabbar-hamburger-icon-width;
@@ -311,7 +303,7 @@ $menu-slide: "transform 500ms ease" !default;
311
303
  1px 16px 1px 1px $tabbar-menu-icon-color,
312
304
  1px 22px 1px 1px $tabbar-menu-icon-color;
313
305
  }
314
- box-shadow: 0 10px 0 1px $tabbar-menu-icon-color,
306
+ box-shadow: 0 10px 0 1px $tabbar-menu-icon-color,
315
307
  0 16px 0 1px $tabbar-menu-icon-color,
316
308
  0 22px 0 1px $tabbar-menu-icon-color;
317
309
  }
@@ -322,14 +314,14 @@ $menu-slide: "transform 500ms ease" !default;
322
314
  1px 16px 1px 1px $tabbar-menu-icon-hover,
323
315
  1px 22px 1px 1px $tabbar-menu-icon-hover;
324
316
  }
325
- box-shadow: 0 10px 0 1px $tabbar-menu-icon-hover,
317
+ box-shadow: 0 10px 0 1px $tabbar-menu-icon-hover,
326
318
  0 16px 0 1px $tabbar-menu-icon-hover,
327
319
  0 22px 0 1px $tabbar-menu-icon-hover;
328
320
  }
329
321
  }
330
322
 
331
- .left-off-canvas-menu { @include left-off-canvas-menu; }
332
- .right-off-canvas-menu { @include right-off-canvas-menu; }
323
+ .left-off-canvas-menu { @include off-canvas-menu($position: left); }
324
+ .right-off-canvas-menu { @include off-canvas-menu($position: right); }
333
325
 
334
326
  ul.off-canvas-list { @include off-canvas-list; }
335
327
 
@@ -340,7 +332,7 @@ $menu-slide: "transform 500ms ease" !default;
340
332
  > .inner-wrap {
341
333
  @include translate3d($off-canvas-width,0,0);
342
334
  }
343
- a.exit-off-canvas { @include back-link;}
335
+ .exit-off-canvas { @include back-link;}
344
336
  }
345
337
 
346
338
  .move-left {
@@ -348,7 +340,7 @@ $menu-slide: "transform 500ms ease" !default;
348
340
  @include translate3d(-($off-canvas-width),0,0);
349
341
 
350
342
  }
351
- a.exit-off-canvas { @include back-link; }
343
+ .exit-off-canvas { @include back-link; }
352
344
  }
353
345
 
354
346
  // Opera 12.16 and IE9 - don't have 3d transforms