foundation-rails 5.0.1.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 (136) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +29 -0
  6. data/Rakefile +1 -0
  7. data/app/controllers/foundation/rails/styleguide_controller.rb +10 -0
  8. data/app/views/foundation/rails/styleguide/show.html.erb +134 -0
  9. data/config/routes.rb +3 -0
  10. data/foundation-rails.gemspec +25 -0
  11. data/lib/foundation-rails.rb +1 -0
  12. data/lib/foundation/rails.rb +3 -0
  13. data/lib/foundation/rails/engine.rb +7 -0
  14. data/lib/foundation/rails/generators/install_generator.rb +56 -0
  15. data/lib/foundation/rails/templates/application.html.erb +19 -0
  16. data/lib/foundation/rails/templates/application.html.haml +18 -0
  17. data/lib/foundation/rails/templates/application.html.slim +17 -0
  18. data/lib/foundation/rails/version.rb +5 -0
  19. data/test/dummy/.gitignore +16 -0
  20. data/test/dummy/Gemfile +47 -0
  21. data/test/dummy/README.rdoc +28 -0
  22. data/test/dummy/Rakefile +6 -0
  23. data/test/dummy/app/assets/images/.keep +0 -0
  24. data/test/dummy/app/assets/javascripts/application.js +8 -0
  25. data/test/dummy/app/assets/stylesheets/application.css +4 -0
  26. data/test/dummy/app/assets/stylesheets/foundation_and_overrides.scss +4 -0
  27. data/test/dummy/app/controllers/application_controller.rb +5 -0
  28. data/test/dummy/app/controllers/concerns/.keep +0 -0
  29. data/test/dummy/app/controllers/styleguide_controller.rb +4 -0
  30. data/test/dummy/app/helpers/application_helper.rb +2 -0
  31. data/test/dummy/app/helpers/styleguide_helper.rb +2 -0
  32. data/test/dummy/app/mailers/.keep +0 -0
  33. data/test/dummy/app/models/.keep +0 -0
  34. data/test/dummy/app/models/concerns/.keep +0 -0
  35. data/test/dummy/app/views/layouts/application.html.erb +19 -0
  36. data/test/dummy/app/views/styleguide/show.html.erb +109 -0
  37. data/test/dummy/bin/bundle +3 -0
  38. data/test/dummy/bin/rails +4 -0
  39. data/test/dummy/bin/rake +4 -0
  40. data/test/dummy/config.ru +4 -0
  41. data/test/dummy/config/application.rb +23 -0
  42. data/test/dummy/config/boot.rb +4 -0
  43. data/test/dummy/config/database.yml +25 -0
  44. data/test/dummy/config/environment.rb +5 -0
  45. data/test/dummy/config/environments/development.rb +29 -0
  46. data/test/dummy/config/environments/production.rb +80 -0
  47. data/test/dummy/config/environments/test.rb +36 -0
  48. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  49. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  50. data/test/dummy/config/initializers/inflections.rb +16 -0
  51. data/test/dummy/config/initializers/mime_types.rb +5 -0
  52. data/test/dummy/config/initializers/secret_token.rb +12 -0
  53. data/test/dummy/config/initializers/session_store.rb +3 -0
  54. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  55. data/test/dummy/config/locales/en.yml +23 -0
  56. data/test/dummy/config/routes.rb +3 -0
  57. data/test/dummy/db/seeds.rb +7 -0
  58. data/test/dummy/lib/assets/.keep +0 -0
  59. data/test/dummy/lib/tasks/.keep +0 -0
  60. data/test/dummy/log/.keep +0 -0
  61. data/test/dummy/public/404.html +58 -0
  62. data/test/dummy/public/422.html +58 -0
  63. data/test/dummy/public/500.html +57 -0
  64. data/test/dummy/public/favicon.ico +0 -0
  65. data/test/dummy/public/robots.txt +5 -0
  66. data/test/dummy/test/controllers/.keep +0 -0
  67. data/test/dummy/test/controllers/styleguide_controller_test.rb +9 -0
  68. data/test/dummy/test/fixtures/.keep +0 -0
  69. data/test/dummy/test/helpers/.keep +0 -0
  70. data/test/dummy/test/helpers/styleguide_helper_test.rb +4 -0
  71. data/test/dummy/test/integration/.keep +0 -0
  72. data/test/dummy/test/mailers/.keep +0 -0
  73. data/test/dummy/test/models/.keep +0 -0
  74. data/test/dummy/test/test_helper.rb +15 -0
  75. data/test/dummy/vendor/assets/javascripts/.keep +0 -0
  76. data/test/dummy/vendor/assets/stylesheets/.keep +0 -0
  77. data/vendor/_settings.scss +992 -0
  78. data/vendor/assets/javascripts/foundation.js +15 -0
  79. data/vendor/assets/javascripts/foundation/foundation.abide.js +201 -0
  80. data/vendor/assets/javascripts/foundation/foundation.accordion.js +41 -0
  81. data/vendor/assets/javascripts/foundation/foundation.alert.js +34 -0
  82. data/vendor/assets/javascripts/foundation/foundation.clearing.js +450 -0
  83. data/vendor/assets/javascripts/foundation/foundation.dropdown.js +184 -0
  84. data/vendor/assets/javascripts/foundation/foundation.interchange.js +304 -0
  85. data/vendor/assets/javascripts/foundation/foundation.joyride.js +839 -0
  86. data/vendor/assets/javascripts/foundation/foundation.js +416 -0
  87. data/vendor/assets/javascripts/foundation/foundation.magellan.js +118 -0
  88. data/vendor/assets/javascripts/foundation/foundation.offcanvas.js +37 -0
  89. data/vendor/assets/javascripts/foundation/foundation.orbit.js +434 -0
  90. data/vendor/assets/javascripts/foundation/foundation.reveal.js +347 -0
  91. data/vendor/assets/javascripts/foundation/foundation.tab.js +37 -0
  92. data/vendor/assets/javascripts/foundation/foundation.tooltip.js +202 -0
  93. data/vendor/assets/javascripts/foundation/foundation.topbar.js +380 -0
  94. data/vendor/assets/javascripts/vendor/modernizr.js +4 -0
  95. data/vendor/assets/stylesheets/foundation.scss +38 -0
  96. data/vendor/assets/stylesheets/foundation/_functions.scss +75 -0
  97. data/vendor/assets/stylesheets/foundation/_settings.scss +992 -0
  98. data/vendor/assets/stylesheets/foundation/components/_accordion.scss +49 -0
  99. data/vendor/assets/stylesheets/foundation/components/_alert-boxes.scss +113 -0
  100. data/vendor/assets/stylesheets/foundation/components/_block-grid.scss +83 -0
  101. data/vendor/assets/stylesheets/foundation/components/_breadcrumbs.scss +123 -0
  102. data/vendor/assets/stylesheets/foundation/components/_button-groups.scss +97 -0
  103. data/vendor/assets/stylesheets/foundation/components/_buttons.scss +234 -0
  104. data/vendor/assets/stylesheets/foundation/components/_clearing.scss +233 -0
  105. data/vendor/assets/stylesheets/foundation/components/_dropdown-buttons.scss +125 -0
  106. data/vendor/assets/stylesheets/foundation/components/_dropdown.scss +159 -0
  107. data/vendor/assets/stylesheets/foundation/components/_flex-video.scss +47 -0
  108. data/vendor/assets/stylesheets/foundation/components/_forms.scss +472 -0
  109. data/vendor/assets/stylesheets/foundation/components/_functions.scss +70 -0
  110. data/vendor/assets/stylesheets/foundation/components/_global.scss +387 -0
  111. data/vendor/assets/stylesheets/foundation/components/_grid.scss +234 -0
  112. data/vendor/assets/stylesheets/foundation/components/_inline-lists.scss +52 -0
  113. data/vendor/assets/stylesheets/foundation/components/_joyride.scss +220 -0
  114. data/vendor/assets/stylesheets/foundation/components/_keystrokes.scss +57 -0
  115. data/vendor/assets/stylesheets/foundation/components/_labels.scss +100 -0
  116. data/vendor/assets/stylesheets/foundation/components/_magellan.scss +30 -0
  117. data/vendor/assets/stylesheets/foundation/components/_offcanvas.scss +360 -0
  118. data/vendor/assets/stylesheets/foundation/components/_orbit.scss +353 -0
  119. data/vendor/assets/stylesheets/foundation/components/_pagination.scss +145 -0
  120. data/vendor/assets/stylesheets/foundation/components/_panels.scss +87 -0
  121. data/vendor/assets/stylesheets/foundation/components/_pricing-tables.scss +146 -0
  122. data/vendor/assets/stylesheets/foundation/components/_progress-bars.scss +75 -0
  123. data/vendor/assets/stylesheets/foundation/components/_reveal.scss +165 -0
  124. data/vendor/assets/stylesheets/foundation/components/_side-nav.scss +83 -0
  125. data/vendor/assets/stylesheets/foundation/components/_split-buttons.scss +187 -0
  126. data/vendor/assets/stylesheets/foundation/components/_sub-nav.scss +118 -0
  127. data/vendor/assets/stylesheets/foundation/components/_switch.scss +314 -0
  128. data/vendor/assets/stylesheets/foundation/components/_tables.scss +93 -0
  129. data/vendor/assets/stylesheets/foundation/components/_tabs.scss +95 -0
  130. data/vendor/assets/stylesheets/foundation/components/_thumbs.scss +71 -0
  131. data/vendor/assets/stylesheets/foundation/components/_tooltips.scss +121 -0
  132. data/vendor/assets/stylesheets/foundation/components/_top-bar.scss +590 -0
  133. data/vendor/assets/stylesheets/foundation/components/_type.scss +447 -0
  134. data/vendor/assets/stylesheets/foundation/components/_visibility.scss +661 -0
  135. data/vendor/assets/stylesheets/normalize.scss +410 -0
  136. metadata +292 -0
@@ -0,0 +1,57 @@
1
+ @import "global";
2
+
3
+ //
4
+ // @variables
5
+ //
6
+ $include-html-type-classes: $include-html-classes !default;
7
+
8
+ // We use these to control text styles.
9
+ $keystroke-font: "Consolas", "Menlo", "Courier", monospace !default;
10
+ $keystroke-font-size: rem-calc(14) !default;
11
+ $keystroke-font-color: #222 !default;
12
+ $keystroke-font-color-alt: #fff !default;
13
+ $keystroke-function-factor: 7% !default;
14
+
15
+ // We use this to control keystroke padding.
16
+ $keystroke-padding: rem-calc(2 4 0) !default;
17
+
18
+ // We use these to control background and border styles.
19
+ $keystroke-bg: darken(#fff, $keystroke-function-factor) !default;
20
+ $keystroke-border-style: solid !default;
21
+ $keystroke-border-width: 1px !default;
22
+ $keystroke-border-color: darken($keystroke-bg, $keystroke-function-factor) !default;
23
+ $keystroke-radius: $global-radius !default;
24
+
25
+ //
26
+ // @mixins
27
+ //
28
+ // We use this mixin to create keystroke styles.
29
+ // $bg - Default: $keystroke-bg || darken(#fff, $keystroke-function-factor) !default;
30
+ @mixin keystroke($bg:$keystroke-bg) {
31
+ // This find the lightness percentage of the background color.
32
+ $bg-lightness: lightness($bg);
33
+
34
+ background-color: $bg;
35
+ border-color: darken($bg, $keystroke-function-factor);
36
+
37
+ // We adjust the font color based on the brightness of the background.
38
+ @if $bg-lightness > 70% { color: $keystroke-font-color; }
39
+ @else { color: $keystroke-font-color-alt; }
40
+
41
+ border-style: $keystroke-border-style;
42
+ border-width: $keystroke-border-width;
43
+ margin: 0;
44
+ font-family: $keystroke-font;
45
+ font-size: $keystroke-font-size;
46
+ padding: $keystroke-padding;
47
+ }
48
+
49
+ @include exports("keystroke") {
50
+ @if $include-html-type-classes {
51
+ .keystroke,
52
+ kbd {
53
+ @include keystroke;
54
+ @include radius($keystroke-radius);
55
+ }
56
+ }
57
+ }
@@ -0,0 +1,100 @@
1
+ @import "global";
2
+
3
+ //
4
+ // @variables
5
+ //
6
+ $include-html-label-classes: $include-html-classes !default;
7
+
8
+ // We use these to style the labels
9
+ $label-padding: rem-calc(4 8 6) !default;
10
+ $label-radius: $global-radius !default;
11
+
12
+ // We use these to style the label text
13
+ $label-font-sizing: rem-calc(11) !default;
14
+ $label-font-weight: normal !default;
15
+ $label-font-color: #333 !default;
16
+ $label-font-color-alt: #fff !default;
17
+ $label-font-family: $body-font-family !default;
18
+
19
+ //
20
+ // @mixins
21
+ //
22
+ // We use this mixin to create a default label base.
23
+ @mixin label-base {
24
+ font-weight: $label-font-weight;
25
+ font-family: $label-font-family;
26
+ text-align: center;
27
+ text-decoration: none;
28
+ line-height: 1;
29
+ white-space: nowrap;
30
+ display: inline-block;
31
+ position: relative;
32
+ margin-bottom: inherit;
33
+ }
34
+
35
+ // @mixins
36
+ //
37
+ // We use this mixin to add label size styles.
38
+ // $padding - Used to determine label padding. Default: $label-padding || rem-calc(3 10 4) !default
39
+ // $text-size - Used to determine label text-size. Default: $text-size found in settings
40
+ @mixin label-size($padding:$label-padding, $text-size:$label-font-sizing) {
41
+ @if $padding { padding: $padding; }
42
+ @if $text-size { font-size: $text-size; }
43
+ }
44
+
45
+ // @mixins
46
+ //
47
+ // We use this mixin to add label styles.
48
+ // $bg - Default: $primary-color (found in settings file)
49
+ // $radius - Default: false, Options: true, sets radius to $global-radius (found in settings file)
50
+ @mixin label-style($bg:$primary-color, $radius:false) {
51
+
52
+ // We control which background color comes through
53
+ @if $bg {
54
+
55
+ // This find the lightness percentage of the background color.
56
+ $bg-lightness: lightness($bg);
57
+
58
+ background-color: $bg;
59
+
60
+ // We control the text color for you based on the background color.
61
+ @if $bg-lightness < 70% { color: $label-font-color-alt; }
62
+ @else { color: $label-font-color; }
63
+ }
64
+
65
+ // We use this to control the radius on labels.
66
+ @if $radius == true { @include radius($label-radius); }
67
+ @else if $radius { @include radius($radius); }
68
+
69
+ }
70
+
71
+ // @mixins
72
+ //
73
+ // We use this to add close buttons to alerts
74
+ // $padding - Default: $label-padding,
75
+ // $text-size - Default: $label-font-sizing,
76
+ // $bg - Default: $primary-color(found in settings file)
77
+ // $radius - Default: false, Options: true which sets radius to $global-radius (found in settings file)
78
+ @mixin label($padding:$label-padding, $text-size:$label-font-sizing, $bg:$primary-color, $radius:false) {
79
+
80
+ @include label-base;
81
+ @include label-size($padding, $text-size);
82
+ @include label-style($bg, $radius);
83
+ }
84
+
85
+ @include exports("label") {
86
+ @if $include-html-label-classes {
87
+ .label {
88
+ @include label-base;
89
+ @include label-size;
90
+ @include label-style;
91
+
92
+ &.radius { @include label-style(false, true); }
93
+ &.round { @include label-style(false, $radius:1000px); }
94
+
95
+ &.alert { @include label-style($alert-color); }
96
+ &.success { @include label-style($success-color); }
97
+ &.secondary { @include label-style($secondary-color); }
98
+ }
99
+ }
100
+ }
@@ -0,0 +1,30 @@
1
+ @import "global";
2
+
3
+ //
4
+ // @variables
5
+ //
6
+ $include-html-magellan-classes: $include-html-classes !default;
7
+
8
+ $magellan-bg: #fff !default;
9
+ $magellan-padding: 10px !default;
10
+
11
+ @include exports("magellan") {
12
+ @if $include-html-magellan-classes {
13
+
14
+ [data-magellan-expedition] {
15
+ background: $magellan-bg;
16
+ z-index: 50;
17
+ min-width: 100%;
18
+ padding: $magellan-padding;
19
+
20
+ .sub-nav {
21
+ margin-bottom: 0;
22
+ dd { margin-bottom: 0; }
23
+ .active {
24
+ line-height: 1.8em;
25
+ }
26
+ }
27
+ }
28
+
29
+ }
30
+ }
@@ -0,0 +1,360 @@
1
+ @import "global";
2
+ @import "type";
3
+ @import "top-bar";
4
+
5
+ // OFF CANVAS VARIABLES
6
+ // Off Canvas Tab Bar Variables
7
+ $tabbar-bg: #333 !default;
8
+ $tabbar-height: rem-calc(45) !default;
9
+ $tabbar-line-height: $tabbar-height !default;
10
+ $tabbar-color: #FFF !default;
11
+ $tabbar-middle-padding: 0 rem-calc(10) !default;
12
+
13
+ // Off Canvas Divider Styles
14
+ $tabbar-right-section-border: solid 1px lighten($tabbar-bg, 10%) !default;
15
+ $tabbar-left-section-border: solid 1px darken($tabbar-bg, 10%) !default;
16
+
17
+ // Off Canvas Tab Bar Headers
18
+ $tabbar-header-color: #FFF !default;
19
+ $tabbar-header-weight: bold !default;
20
+ $tabbar-header-line-height: $tabbar-height !default;
21
+ $tabbar-header-margin: 0 !default;
22
+
23
+ // Off Canvas Menu Variables
24
+ $off-canvas-width: 250px !default;
25
+ $off-canvas-bg: #333 !default;
26
+
27
+ // Off Canvas Menu List Variables
28
+ $off-canvas-label-padding: 0.3rem rem-calc(15) !default;
29
+ $off-canvas-label-color: #999 !default;
30
+ $off-canvas-label-text-transform: uppercase !default;
31
+ $off-canvas-label-font-weight: bold !default;
32
+ $off-canvas-label-bg: #444 !default;
33
+ $off-canvas-label-border-top: 1px solid lighten(#444, 10%) !default;
34
+ $off-canvas-label-border-bottom: none !default;
35
+ $off-canvas-label-margin:0 !default;
36
+ $off-canvas-link-padding: rem-calc(10, 15) !default;
37
+ $off-canvas-link-color: rgba(#FFF, 0.7) !default;
38
+ $off-canvas-link-border-bottom: 1px solid darken($off-canvas-bg, 5%) !default;
39
+
40
+ // Off Canvas Menu Icon Variables
41
+ $tabbar-menu-icon-color: #FFF !default;
42
+ $tabbar-menu-icon-hover: darken($tabbar-menu-icon-color, 30%) !default;
43
+
44
+ $tabbar-menu-icon-text-indent: rem-calc(35) !default;
45
+ $tabbar-menu-icon-width: $tabbar-height !default;
46
+ $tabbar-menu-icon-height: $tabbar-height !default;
47
+ $tabbar-menu-icon-line-height: rem-calc(33) !default;
48
+ $tabbar-menu-icon-padding: 0 !default;
49
+
50
+ $tabbar-hamburger-icon-width: rem-calc(16) !default;
51
+ $tabbar-hamburger-icon-left: rem-calc(13) !default;
52
+ $tabbar-hamburger-icon-top: rem-calc(5) !default;
53
+
54
+ // Off Canvas Back-Link Overlay
55
+ $off-canvas-overlay-transition: background 300ms ease !default;
56
+ $off-canvas-overlay-cursor: pointer !default;
57
+ $off-canvas-overlay-box-shadow: -4px 0 4px rgba(#000, 0.5), 4px 0 4px rgba(#000, 0.5) !default;
58
+ $off-canvas-overlay-background: rgba(#FFF, 0.2) !default;
59
+ $off-canvas-overlay-background-hover: rgba(#FFF, 0.05) !default;
60
+
61
+ // Transition Variabls
62
+ $menu-slide: "transform 500ms ease" !default;
63
+
64
+
65
+ // EXTEND CLASSES
66
+ // Remove transition flicker on phones
67
+ %kill-flicker {
68
+ -webkit-transform: translateZ(0);
69
+ -webkit-backface-visibility: hidden;
70
+ }
71
+
72
+ // Basic properties for the content wraps
73
+ %wrap-base {
74
+ position: relative;
75
+ width: 100%;
76
+ }
77
+
78
+ // basic styles for off-canvas menu container
79
+ %off-canvas-menu {
80
+ width: $off-canvas-width;
81
+ top:0;
82
+ bottom:0;
83
+ height: 100%;
84
+ position: absolute;
85
+ overflow-y: auto;
86
+ background: $off-canvas-bg;
87
+ z-index: 1001;
88
+ box-sizing: content-box;
89
+ }
90
+
91
+ // TRANSLATE 3D
92
+ @mixin translate3d($tx,$ty,$tz) {
93
+ -webkit-transform: translate3d($tx,$ty,$tz);
94
+ -moz-transform: translate3d($tx,$ty,$tz);
95
+ -ms-transform: translate3d($tx,$ty,$tz);
96
+ -o-transform: translate3d($tx,$ty,$tz);
97
+ transform: translate3d($tx,$ty,$tz)
98
+ }
99
+
100
+ // OFF CANVAS WRAP
101
+ // Wrap visible content and prevent scroll bars
102
+ @mixin off-canvas-wrap {
103
+ @extend %kill-flicker;
104
+ @extend %wrap-base;
105
+ overflow: hidden;
106
+ }
107
+
108
+ // INNER WRAP
109
+ // Main content area that moves to reveal the off-canvas nav
110
+ @mixin inner-wrap {
111
+ @extend %kill-flicker;
112
+ @extend %wrap-base;
113
+ @include clearfix;
114
+
115
+ -webkit-transition: -webkit-#{$menu-slide};
116
+ -moz-transition: -moz-#{$menu-slide};
117
+ -ms-transition: -ms-#{$menu-slide};
118
+ -o-transition: -o-#{$menu-slide};
119
+ transition: #{$menu-slide};
120
+
121
+ }
122
+
123
+ // TAB BAR
124
+ // This is the tab bar base
125
+ @mixin tab-bar-base {
126
+ @extend %kill-flicker;
127
+
128
+ // base styles
129
+ background: $tabbar-bg;
130
+ color: $tabbar-color;
131
+ height: $tabbar-height;
132
+ line-height: $tabbar-height;
133
+
134
+ // make sure it's below the .exit-offcanvas link
135
+ position: relative;
136
+ // z-index: 999;
137
+
138
+ // Typography
139
+ h1,h2,h3,h4,h5,h6 {
140
+ color: $tabbar-header-color;
141
+ font-weight: $tabbar-header-weight;
142
+ line-height: $tabbar-header-line-height;
143
+ margin: $tabbar-header-margin;
144
+ }
145
+ h1,h2,h3,h4 { font-size: $h5-font-size; }
146
+ }
147
+
148
+ // SMALL SECTIONS
149
+ // These are small sections on the left and right that contain the off-canvas toggle buttons;
150
+ %tabbar-small-section {
151
+ width: $tabbar-height;
152
+ height: $tabbar-height;
153
+ position: absolute;
154
+ top:0;
155
+ }
156
+
157
+ @mixin left-small-section {
158
+ @extend %tabbar-small-section;
159
+ border-right: $tabbar-left-section-border;
160
+ box-shadow: 1px 0 0 lighten($tabbar-bg, 10%);
161
+ left:0;
162
+ }
163
+
164
+ @mixin right-small-section {
165
+ @extend %tabbar-small-section;
166
+ border-left: $tabbar-right-section-border;
167
+ box-shadow: -1px 0 0 darken($tabbar-bg, 10%);
168
+ right:0;
169
+ }
170
+
171
+ @mixin tab-bar-section {
172
+ padding: $tabbar-middle-padding;
173
+ position: absolute;
174
+ text-align: center;
175
+ height: $tabbar-height;
176
+ top:0;
177
+ @media #{$medium-up} {
178
+ text-align: left;
179
+ }
180
+
181
+ // still need to make these non-presntational
182
+ &.left {
183
+ left: 0;
184
+ right: $tabbar-height;
185
+ }
186
+ &.right {
187
+ left: $tabbar-height;
188
+ right: 0;
189
+ }
190
+ &.middle {
191
+ left: $tabbar-height;
192
+ right: $tabbar-height;
193
+ }
194
+ }
195
+
196
+ // OFF CANVAS LIST
197
+ // This is the list of links in the off-canvas menu
198
+ @mixin off-canvas-list {
199
+ list-style-type: none;
200
+ padding:0;
201
+ margin:0;
202
+
203
+ li {
204
+ label {
205
+ padding: $off-canvas-label-padding;
206
+ color: $off-canvas-label-color;
207
+ text-transform: $off-canvas-label-text-transform;
208
+ font-weight: $off-canvas-label-font-weight;
209
+ background: $off-canvas-label-bg;
210
+ border-top: $off-canvas-label-border-top;
211
+ border-bottom: $off-canvas-label-border-bottom;
212
+ margin: $off-canvas-label-margin;
213
+ }
214
+ a {
215
+ display: block;
216
+ padding: $off-canvas-link-padding;
217
+ color: $off-canvas-link-color;
218
+ border-bottom: $off-canvas-link-border-bottom;
219
+ }
220
+ }
221
+
222
+ }
223
+
224
+ // BACK LINK
225
+ // This is an overlay that, when clicked, will toggle off the off canvas menu
226
+ @mixin back-link {
227
+ @extend %kill-flicker;
228
+
229
+ transition: $off-canvas-overlay-transition;
230
+ cursor: $off-canvas-overlay-cursor;
231
+ box-shadow: $off-canvas-overlay-box-shadow;
232
+
233
+ // fill the screen
234
+ display: block;
235
+ position: absolute;
236
+ background: $off-canvas-overlay-background;
237
+ top: 0;
238
+ bottom: 0;
239
+ left:0;
240
+ right:0;
241
+ z-index: 1002;
242
+
243
+ @media #{$medium-up} {
244
+ &:hover {
245
+ background: $off-canvas-overlay-background-hover;
246
+ }
247
+ }
248
+ }
249
+
250
+ // OFF CANVAS MENUS
251
+ // These are the containers that contain the off canvas content
252
+ @mixin left-off-canvas-menu {
253
+ @extend %kill-flicker;
254
+ @extend %off-canvas-menu;
255
+ @include translate3d(-100%,0,0);
256
+ * { @extend %kill-flicker; }
257
+ }
258
+ @mixin right-off-canvas-menu {
259
+ @extend %kill-flicker;
260
+ @extend %off-canvas-menu;
261
+ @include translate3d(100%,0,0);
262
+ right:0;
263
+ }
264
+
265
+
266
+ //
267
+ // DEFAULT CLASSES
268
+ //
269
+
270
+ .off-canvas-wrap { @include off-canvas-wrap; }
271
+ .inner-wrap { @include inner-wrap; }
272
+
273
+ nav.tab-bar { @include tab-bar-base; }
274
+
275
+ section.left-small { @include left-small-section; }
276
+ section.right-small { @include right-small-section; }
277
+
278
+ section.tab-bar-section { @include tab-bar-section; }
279
+
280
+ // MENU BUTTON
281
+ // This is a little bonus. You don't need it for off canvas to work. Mixins to be written in the future.
282
+ a.menu-icon {
283
+ text-indent: $tabbar-menu-icon-text-indent;
284
+ width: $tabbar-height;
285
+ height: $tabbar-height;
286
+ display: block;
287
+ line-height: $tabbar-menu-icon-line-height;
288
+ padding: $tabbar-menu-icon-padding;
289
+ color: $topbar-menu-link-color;
290
+ position: relative;
291
+
292
+ // this is the actual hamburger icon
293
+ span {
294
+
295
+ position: absolute;
296
+ display: block;
297
+ width: $tabbar-hamburger-icon-width;
298
+ height: 0;
299
+ left: $tabbar-hamburger-icon-left;
300
+ top: $tabbar-hamburger-icon-top;
301
+ // margin-top: $tabbar-height / 4;
302
+
303
+ @if $experimental {
304
+ -webkit-box-shadow: 0 10px 0 1px $tabbar-menu-icon-color,
305
+ 0 16px 0 1px $tabbar-menu-icon-color,
306
+ 0 22px 0 1px $tabbar-menu-icon-color;
307
+ }
308
+ box-shadow: 0 10px 0 1px $tabbar-menu-icon-color,
309
+ 0 16px 0 1px $tabbar-menu-icon-color,
310
+ 0 22px 0 1px $tabbar-menu-icon-color;
311
+ }
312
+
313
+ &:hover span {
314
+ @if $experimental {
315
+ -webkit-box-shadow: 0 10px 0 1px $tabbar-menu-icon-hover,
316
+ 0 16px 0 1px $tabbar-menu-icon-hover,
317
+ 0 22px 0 1px $tabbar-menu-icon-hover;
318
+ }
319
+ box-shadow: 0 10px 0 1px $tabbar-menu-icon-hover,
320
+ 0 16px 0 1px $tabbar-menu-icon-hover,
321
+ 0 22px 0 1px $tabbar-menu-icon-hover;
322
+ }
323
+ }
324
+
325
+ .left-off-canvas-menu { @include left-off-canvas-menu; }
326
+ .right-off-canvas-menu { @include right-off-canvas-menu; }
327
+
328
+ ul.off-canvas-list { @include off-canvas-list; }
329
+
330
+
331
+ // ANIMATION CLASSES
332
+ // These classes are added with JS and trigger the actual animation.
333
+ .move-right {
334
+ > .inner-wrap {
335
+ @include translate3d($off-canvas-width,0,0);
336
+ }
337
+ a.exit-off-canvas { @include back-link;}
338
+ }
339
+
340
+ .move-left {
341
+ > .inner-wrap {
342
+ @include translate3d(-($off-canvas-width),0,0);
343
+
344
+ }
345
+ a.exit-off-canvas { @include back-link; }
346
+ }
347
+
348
+ // IE9 HAX
349
+ // Womp womp! IE9 doesn't do CSS transforms. Let's fix this.
350
+ .lt-ie10 {
351
+
352
+ // move off canvas menus off the viewport
353
+ .left-off-canvas-menu { left: -($off-canvas-width); }
354
+ .right-off-canvas-menu { right: -($off-canvas-width); }
355
+
356
+ // Snap them in place
357
+ .move-left > .inner-wrap { right: $off-canvas-width; }
358
+ .move-right > .inner-wrap { left: $off-canvas-width; }
359
+
360
+ }