zurb-foundation 4.2.3 → 4.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. data/CONTRIBUTING.md +1 -1
  2. data/Gemfile.lock +1 -1
  3. data/README.md +8 -0
  4. data/docs/CHANGELOG.md +17 -0
  5. data/docs/README.md +3 -1
  6. data/docs/_sidebar-components.html.erb +2 -1
  7. data/docs/_sidebar.html.erb +2 -1
  8. data/docs/compile.rb +8 -1
  9. data/docs/components/abide.html.erb +371 -0
  10. data/docs/components/alert-boxes.html.erb +12 -9
  11. data/docs/components/block-grid.html.erb +1 -1
  12. data/docs/components/breadcrumbs.html.erb +7 -5
  13. data/docs/components/button-groups.html.erb +4 -2
  14. data/docs/components/buttons.html.erb +13 -9
  15. data/docs/components/clearing.html.erb +2 -0
  16. data/docs/components/dropdown-buttons.html.erb +59 -55
  17. data/docs/components/dropdown.html.erb +34 -32
  18. data/docs/components/flex-video.html.erb +4 -2
  19. data/docs/components/forms.html.erb +16 -15
  20. data/docs/components/global.html.erb +27 -4
  21. data/docs/components/grid.html.erb +21 -3
  22. data/docs/components/inline-lists.html.erb +8 -3
  23. data/docs/components/joyride.html.erb +5 -3
  24. data/docs/components/keystrokes.html.erb +4 -2
  25. data/docs/components/kitchen-sink.html.erb +15 -40
  26. data/docs/components/labels.html.erb +4 -2
  27. data/docs/components/magellan.html.erb +4 -2
  28. data/docs/components/orbit.html.erb +39 -27
  29. data/docs/components/pagination.html.erb +10 -8
  30. data/docs/components/panels.html.erb +7 -3
  31. data/docs/components/pricing-tables.html.erb +12 -10
  32. data/docs/components/progress-bars.html.erb +6 -4
  33. data/docs/components/reveal.html.erb +7 -28
  34. data/docs/components/section.html.erb +15 -13
  35. data/docs/components/side-nav.html.erb +5 -3
  36. data/docs/components/split-buttons.html.erb +45 -43
  37. data/docs/components/sub-nav.html.erb +7 -5
  38. data/docs/components/switch.html.erb +3 -1
  39. data/docs/components/tables.html.erb +8 -6
  40. data/docs/components/thumbnails.html.erb +2 -0
  41. data/docs/components/tooltips.html.erb +6 -4
  42. data/docs/components/top-bar.html.erb +9 -8
  43. data/docs/components/type.html.erb +20 -18
  44. data/docs/config.ru +2 -1
  45. data/docs/css/_footer.scss +420 -0
  46. data/docs/css/_offcanvas.scss +140 -0
  47. data/docs/css/docs.scss +10 -1
  48. data/docs/fonts/ProximaNova-Reg-webfont.eot +0 -0
  49. data/docs/fonts/ProximaNova-Reg-webfont.svg +244 -0
  50. data/docs/fonts/ProximaNova-Reg-webfont.ttf +0 -0
  51. data/docs/fonts/ProximaNova-Reg-webfont.woff +0 -0
  52. data/docs/fonts/proximanovacond-bold-webfont.eot +0 -0
  53. data/docs/fonts/proximanovacond-bold-webfont.svg +247 -0
  54. data/docs/fonts/proximanovacond-bold-webfont.ttf +0 -0
  55. data/docs/fonts/proximanovacond-bold-webfont.woff +0 -0
  56. data/docs/img/demos/orbit/demo1.jpg +0 -0
  57. data/docs/img/demos/orbit/demo2.jpg +0 -0
  58. data/docs/img/demos/orbit/demo3.jpg +0 -0
  59. data/docs/img/icons/footer-icons.png +0 -0
  60. data/docs/img/icons/footer-top-icons.png +0 -0
  61. data/docs/img/icons/social.png +0 -0
  62. data/docs/img/offcanvas/footer-icons.png +0 -0
  63. data/docs/img/offcanvas/menu-wht.png +0 -0
  64. data/docs/img/offcanvas/search.png +0 -0
  65. data/docs/img/offcanvas/zurb-logo.png +0 -0
  66. data/docs/img/offcanvas/zurb-wht.png +0 -0
  67. data/docs/js/docs.js +1 -0
  68. data/docs/js/jquery.offcanvas.js +28 -0
  69. data/docs/layout.html.erb +226 -42
  70. data/docs/media-queries.html.erb +3 -3
  71. data/docs/sass.html.erb +142 -142
  72. data/docs/support.html.erb +1 -1
  73. data/js/foundation/foundation.abide.js +194 -0
  74. data/js/foundation/foundation.dropdown.js +8 -9
  75. data/js/foundation/foundation.forms.js +11 -3
  76. data/js/foundation/foundation.interchange.js +25 -16
  77. data/js/foundation/foundation.joyride.js +9 -3
  78. data/js/foundation/foundation.js +2 -3
  79. data/js/foundation/foundation.magellan.js +3 -2
  80. data/js/foundation/foundation.orbit.js +359 -344
  81. data/js/foundation/foundation.reveal.js +1 -1
  82. data/js/foundation/foundation.section.js +290 -311
  83. data/js/foundation/foundation.tooltips.js +2 -2
  84. data/js/foundation/foundation.topbar.js +20 -23
  85. data/js/foundation/index.js +1 -0
  86. data/js/vendor/jquery.js +103 -121
  87. data/lib/foundation/generators/templates/application.html.slim +15 -8
  88. data/lib/foundation/version.rb +1 -1
  89. data/scss/foundation.scss +2 -5
  90. data/scss/foundation/_variables.scss +326 -295
  91. data/scss/foundation/components/_alert-boxes.scss +10 -10
  92. data/scss/foundation/components/_block-grid.scss +1 -1
  93. data/scss/foundation/components/_breadcrumbs.scss +8 -8
  94. data/scss/foundation/components/_button-groups.scss +2 -2
  95. data/scss/foundation/components/_buttons.scss +18 -18
  96. data/scss/foundation/components/_custom-forms.scss +20 -14
  97. data/scss/foundation/components/_dropdown-buttons.scss +9 -9
  98. data/scss/foundation/components/_dropdown.scss +4 -4
  99. data/scss/foundation/components/_flex-video.scss +3 -3
  100. data/scss/foundation/components/_forms.scss +54 -24
  101. data/scss/foundation/components/_global.scss +28 -5
  102. data/scss/foundation/components/_grid-5.scss +214 -0
  103. data/scss/foundation/components/_grid.scss +3 -3
  104. data/scss/foundation/components/_inline-lists.scss +3 -3
  105. data/scss/foundation/components/_joyride.scss +6 -6
  106. data/scss/foundation/components/_keystrokes.scss +3 -3
  107. data/scss/foundation/components/_labels.scss +3 -3
  108. data/scss/foundation/components/_orbit.scss +34 -9
  109. data/scss/foundation/components/_pagination.scss +8 -6
  110. data/scss/foundation/components/_panels.scss +3 -3
  111. data/scss/foundation/components/_pricing-tables.scss +10 -10
  112. data/scss/foundation/components/_progress-bars.scss +3 -3
  113. data/scss/foundation/components/_reveal.scss +7 -7
  114. data/scss/foundation/components/_section.scss +252 -214
  115. data/scss/foundation/components/_side-nav.scss +3 -3
  116. data/scss/foundation/components/_split-buttons.scss +7 -7
  117. data/scss/foundation/components/_sub-nav.scss +7 -7
  118. data/scss/foundation/components/_switch.scss +4 -4
  119. data/scss/foundation/components/_tables.scss +6 -6
  120. data/scss/foundation/components/_tooltips.scss +4 -4
  121. data/scss/foundation/components/_top-bar.scss +14 -10
  122. data/scss/foundation/components/_type.scss +23 -23
  123. data/templates/project/index.html +4 -4
  124. data/templates/project/scss/app.scss +8 -0
  125. metadata +29 -4
@@ -56,7 +56,7 @@
56
56
  <p>We've included SCSS mixins used to style alert boxes. To use these mixins, you'll need to have the <a href="../sass.html">extension installed</a> or grab <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/_variables.scss">_variables.scss</a>, <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/components/_global.scss">_global.scss</a> and <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/components/_alert-boxes.scss">_alert-boxes.scss</a> from Github and throw them into a Foundation folder in your project directory. From there, you can import the files at the top of your own SCSS stylesheet, like so:</p>
57
57
 
58
58
  <%= code_example '
59
- @import "foundation/variables", "foundation/components/global", "foundation/components/alerts";
59
+ @import "foundation/variables", "foundation/components/global", "foundation/components/alert-boxes";
60
60
  ', :css %>
61
61
 
62
62
  <p>If you are using the mixins, you may include the styles on whatever class or ID you'd like, just make sure you follow our markup structure:</p>
@@ -144,15 +144,17 @@
144
144
 
145
145
  <h5>Default SCSS Variables</h5>
146
146
  <%= code_example '
147
+ $include-html-alert-classes: $include-html-classes;
148
+
147
149
  /* We use this to control alert padding. */
148
- $alert-padding-top: emCalc(11px);
149
- $alert-padding-left: $alert-padding-top;
150
- $alert-padding-right: $alert-padding-top + emCalc(10px);
151
- $alert-padding-bottom: $alert-padding-top + emCalc(1px);
150
+ $alert-padding-top: emCalc(11);
151
+ $alert-padding-default-float: $alert-padding-top;
152
+ $alert-padding-opposite-direction: $alert-padding-top + emCalc(10);
153
+ $alert-padding-bottom: $alert-padding-top + emCalc(1);
152
154
 
153
155
  /* We use these to control text style. */
154
156
  $alert-font-weight: bold;
155
- $alert-font-size: emCalc(14px);
157
+ $alert-font-size: emCalc(14);
156
158
  $alert-font-color: #fff;
157
159
  $alert-font-color-alt: darken($secondary-color, 60%);
158
160
 
@@ -163,18 +165,19 @@ $alert-function-factor: 10%;
163
165
  $alert-border-style: solid;
164
166
  $alert-border-width: 1px;
165
167
  $alert-border-color: darken($primary-color, $alert-function-factor);
166
- $alert-bottom-margin: emCalc(20px);
168
+ $alert-bottom-margin: emCalc(20);
167
169
 
168
170
  /* We use these to style the close buttons */
169
171
  $alert-close-color: #333;
170
- $alert-close-position: emCalc(5px);
171
- $alert-close-font-size: emCalc(22px);
172
+ $alert-close-position: emCalc(5);
173
+ $alert-close-font-size: emCalc(22);
172
174
  $alert-close-opacity: 0.3;
173
175
  $alert-close-opacity-hover: 0.5;
174
176
  $alert-close-padding: 5px 4px 4px;
175
177
 
176
178
  /* We use this to control border radius */
177
179
  $alert-radius: $global-radius;
180
+
178
181
  ', :css %>
179
182
 
180
183
  <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>.</p>
@@ -111,7 +111,7 @@ $base-style: true
111
111
  <%= code_example '
112
112
  /* We use this to control the maximum blocks and spacing */
113
113
  $block-grid-elements: 12;
114
- $block-grid-default-spacing: emCalc(20px);
114
+ $block-grid-default-spacing: emCalc(20);
115
115
 
116
116
  /* Enables media queries for block-grid classes. Set to false if writing semantic HTML. */
117
117
  $block-grid-media-queries: true
@@ -116,12 +116,14 @@
116
116
 
117
117
  <h5>Default SCSS Variables</h5>
118
118
  <%= code_example '
119
- /* We use this to set the background color for the breadcrumb container */
120
- $crumb-bg: lighten($secondaryColor, 5%);
119
+ $include-html-nav-classes: $include-html-classes;
120
+
121
+ /* We use this to set the background color for the breadcrumb container. */
122
+ $crumb-bg: lighten($secondary-color, 5%);
121
123
 
122
124
  /* We use these to set the padding around the breadcrumbs. */
123
- $crumb-padding: emCalc(6px) emCalc(14px) emCalc(9px);
124
- $crumb-side-padding: emCalc(12px);
125
+ $crumb-padding: emCalc(9, 14, 9);
126
+ $crumb-side-padding: emCalc(12);
125
127
 
126
128
  /* We use these to control border styles. */
127
129
  $crumb-function-factor: 10%;
@@ -131,7 +133,7 @@ $crumb-border-color: darken($crumb-bg, $crumb-function-factor);
131
133
  $crumb-radius: $global-radius;
132
134
 
133
135
  /* We use these to set various text styles for breadcrumbs. */
134
- $crumb-font-size: emCalc(11px);
136
+ $crumb-font-size: emCalc(11);
135
137
  $crumb-font-color: $primary-color;
136
138
  $crumb-font-color-current: #333;
137
139
  $crumb-font-color-unavailable: #999;
@@ -212,8 +212,10 @@ $float: left
212
212
 
213
213
  <h5>Default SCSS Variables</h5>
214
214
  <%= code_example '
215
- /* We use this to set the margin below button groups. */
216
- $button-bar-margin-right: emCalc(10px);
215
+ $include-html-button-classes: $include-html-classes;
216
+
217
+ /* Sets the margin for the right side by default, and the left margin if right-to-left direction is used *.
218
+ $button-bar-margin-opposite: emCalc(10);
217
219
  ', :css %>
218
220
 
219
221
  <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>.</p>
@@ -173,23 +173,26 @@ $active: true
173
173
 
174
174
  <h5>Default SCSS Variables</h5>
175
175
  <%= code_example '
176
+ $include-html-button-classes: $include-html-classes;
177
+
176
178
  /* We use these to build padding for buttons. */
177
- $button-med: emCalc(12px);
178
- $button-tny: emCalc(7px);
179
- $button-sml: emCalc(9px);
180
- $button-lrg: emCalc(16px);
179
+ $button-med: emCalc(12);
180
+ $button-tny: emCalc(7);
181
+ $button-sml: emCalc(9);
182
+ $button-lrg: emCalc(16);
181
183
 
182
184
  /* We use this to control the display property. */
183
185
  $button-display: inline-block;
184
- $button-margin-bottom: emCalc(20px);
186
+ $button-margin-bottom: emCalc(20);
185
187
 
186
188
  /* We use these to control button text styles. */
189
+ $button-font-family: inherit;
187
190
  $button-font-color: #fff;
188
191
  $button-font-color-alt: #333;
189
- $button-font-med: emCalc(16px);
190
- $button-font-tny: emCalc(11px);
191
- $button-font-sml: emCalc(13px);
192
- $button-font-lrg: emCalc(20px);
192
+ $button-font-med: emCalc(16);
193
+ $button-font-tny: emCalc(11);
194
+ $button-font-sml: emCalc(13);
195
+ $button-font-lrg: emCalc(20);
193
196
  $button-font-weight: bold;
194
197
  $button-font-align: center;
195
198
 
@@ -203,6 +206,7 @@ $button-border-color: darken($primary-color, $button-function-factor);
203
206
 
204
207
  /* We use this to set the default radius used throughout the core. */
205
208
  $button-radius: $global-radius;
209
+ $button-round: $global-rounded;
206
210
 
207
211
  /* We use this to set default opacity for disabled buttons. */
208
212
  $button-disabled-opacity: 0.6;
@@ -99,6 +99,8 @@
99
99
  <h3>Available SCSS Variables</h3>
100
100
  <p>We opted not to create mixins for this plugin because it relies on classes in the JS to work. These variables should give you the control you need to change styles as you see fit:</p>
101
101
  <%= code_example '
102
+ $include-html-clearing-classes: $include-html-classes;
103
+
102
104
  /* We use these to set the background colors for parts of Clearing. */
103
105
  $clearing-bg: #111;
104
106
  $clearing-caption-bg: $clearing-bg;
@@ -15,10 +15,39 @@
15
15
  <div class="large-12 columns">
16
16
 
17
17
  <a href="#" data-dropdown="drop" class="tiny button dropdown">Dropdown Button</a><br>
18
+ <ul id="drop" data-dropdown-content class="f-dropdown">
19
+ <li><a href="#">This is a link</a></li>
20
+ <li><a href="#">This is another</a></li>
21
+ <li><a href="#">Yet another</a></li>
22
+ </ul>
23
+
18
24
  <a href="#" data-dropdown="drop2" class="small secondary radius button dropdown">Dropdown Button</a><br>
25
+ <ul id="drop2" data-dropdown-content class="f-dropdown">
26
+ <li><a href="#">This is a link</a></li>
27
+ <li><a href="#">This is another</a></li>
28
+ <li><a href="#">Yet another</a></li>
29
+ </ul>
30
+
19
31
  <a href="#" data-dropdown="drop3" class="button alert round dropdown">Dropdown Button</a><br>
32
+ <ul id="drop3" data-dropdown-content class="f-dropdown">
33
+ <li><a href="#">This is a link</a></li>
34
+ <li><a href="#">This is another</a></li>
35
+ <li><a href="#">Yet another</a></li>
36
+ </ul>
37
+
20
38
  <a href="#" data-dropdown="drop4" class="large success button dropdown">Dropdown Button</a><br>
39
+ <ul id="drop4" data-dropdown-content class="f-dropdown">
40
+ <li><a href="#">This is a link</a></li>
41
+ <li><a href="#">This is another</a></li>
42
+ <li><a href="#">Yet another</a></li>
43
+ </ul>
44
+
21
45
  <a href="#" data-dropdown="drop5" class="large button dropdown expand">Dropdown Button</a><br>
46
+ <ul id="drop5" data-dropdown-content class="f-dropdown">
47
+ <li><a href="#">This is a link</a></li>
48
+ <li><a href="#">This is another</a></li>
49
+ <li><a href="#">Yet another</a></li>
50
+ </ul>
22
51
 
23
52
  <hr>
24
53
 
@@ -78,6 +107,11 @@
78
107
  ', :css %>
79
108
 
80
109
  <a href="" data-dropdown="drop7 "class="dropdown button">Default Dropdown Button</a>
110
+ <ul id="drop7" data-dropdown-content class="f-dropdown">
111
+ <li><a href="#">This is a link</a></li>
112
+ <li><a href="#">This is another</a></li>
113
+ <li><a href="#">Yet another</a></li>
114
+ </ul>
81
115
 
82
116
  <p>There are also <strong>three options</strong> you can customize on the fly when writing this mixin. These control things like: background color, pip color and base styles. Setting any of these options to <strong>false</strong> will not include the styles.</p>
83
117
 
@@ -113,9 +147,16 @@ $base-style: true
113
147
  ', :css %>
114
148
 
115
149
  <a href="#" data-dropdown="drop6" class="customized-dropdown-docs">Button Base, Size, Style &amp; Shine</a>
150
+ <ul id="drop6" data-dropdown-content class="f-dropdown">
151
+ <li><a href="#">This is a link</a></li>
152
+ <li><a href="#">This is another</a></li>
153
+ <li><a href="#">Yet another</a></li>
154
+ </ul>
116
155
 
117
156
  <h5>Default SCSS Variables</h5>
118
157
  <%= code_example '
158
+ $include-html-button-classes: $include-html-classes;
159
+
119
160
  /* We use these to set the color of the pip in dropdown buttons */
120
161
  $dropdown-button-pip-color: #fff;
121
162
  $dropdown-button-pip-color-alt: #333;
@@ -123,26 +164,26 @@ $dropdown-button-pip-color-alt: #333;
123
164
  /* We use these to style tiny dropdown buttons */
124
165
  $dropdown-button-padding-tny: $button-tny * 5;
125
166
  $dropdown-button-pip-size-tny: $button-tny;
126
- $dropdown-button-pip-right-tny: $button-tny * 2;
127
- $dropdown-button-pip-top-tny: -$button-tny / 2 + emCalc(1px);
167
+ $dropdown-button-pip-opposite-tny: $button-tny * 2;
168
+ $dropdown-button-pip-top-tny: -$button-tny / 2 + emCalc(1);
128
169
 
129
170
  /* We use these to style small dropdown buttons */
130
171
  $dropdown-button-padding-sml: $button-sml * 5;
131
172
  $dropdown-button-pip-size-sml: $button-sml;
132
- $dropdown-button-pip-right-sml: $button-sml * 2;
133
- $dropdown-button-pip-top-sml: -$button-sml / 2 + emCalc(2px);
173
+ $dropdown-button-pip-opposite-sml: $button-sml * 2;
174
+ $dropdown-button-pip-top-sml: -$button-sml / 2 + emCalc(1);
134
175
 
135
176
  /* We use these to style medium dropdown buttons */
136
- $dropdown-button-padding-med: $button-med * 4 + emCalc(3px);
137
- $dropdown-button-pip-size-med $button-med - emCalc(3px);
138
- $dropdown-button-pip-right-med: $button-med * 2;
139
- $dropdown-button-pip-top-med: -$button-med / 2 + emCalc(2px);
177
+ $dropdown-button-padding-med: $button-med * 4 + emCalc(3);
178
+ $dropdown-button-pip-size-med: $button-med - emCalc(3);
179
+ $dropdown-button-pip-opposite-med: $button-med * 2;
180
+ $dropdown-button-pip-top-med: -$button-med / 2 + emCalc(2);
140
181
 
141
182
  /* We use these to style large dropdown buttons */
142
183
  $dropdown-button-padding-lrg: $button-lrg * 4;
143
- $dropdown-button-pip-size-lrg: $button-lrg - emCalc(6px);
144
- $dropdown-button-pip-right-lrg: $button-lrg + emCalc(12px);
145
- $dropdown-button-pip-top-lrg: -$button-lrg / 2 + emCalc(3px);
184
+ $dropdown-button-pip-size-lrg: $button-lrg - emCalc(6);
185
+ $dropdown-button-pip-opposite-lrg: $button-lrg + emCalc(12);
186
+ $dropdown-button-pip-top-lrg: -$button-lrg / 2 + emCalc(3);
146
187
  ', :css %>
147
188
 
148
189
  <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>. It is included in <strong>_variables.scss</strong>.</p>
@@ -170,6 +211,11 @@ $dropdown-button-pip-top-lrg: -$button-lrg / 2 + emCalc(3px);
170
211
  ', :html %>
171
212
 
172
213
  <a href="#" data-dropdown="drop1" class="button dropdown">Dropdown Button</a><br>
214
+ <ul id="drop1" data-dropdown-content class="f-dropdown">
215
+ <li><a href="#">This is a link</a></li>
216
+ <li><a href="#">This is another</a></li>
217
+ <li><a href="#">Yet another</a></li>
218
+ </ul>
173
219
 
174
220
  <p>Required Foundation Library: <code>foundation.dropdown.js</code></p>
175
221
 
@@ -182,7 +228,7 @@ $dropdown-button-pip-top-lrg: -$button-lrg / 2 + emCalc(3px);
182
228
  <%= code_example "
183
229
  {
184
230
  activeClass: 'open'
185
- }", :json %>
231
+ }", :js %>
186
232
  </div>
187
233
  </div>
188
234
 
@@ -190,46 +236,4 @@ $dropdown-button-pip-top-lrg: -$button-lrg / 2 + emCalc(3px);
190
236
  <div class="large-3 pull-9 columns">
191
237
  <%= render "_sidebar-components.html.erb" %>
192
238
  </div>
193
- </div>
194
-
195
-
196
- <ul id="drop" data-dropdown-content class="f-dropdown">
197
- <li><a href="#">This is a link</a></li>
198
- <li><a href="#">This is another</a></li>
199
- <li><a href="#">Yet another</a></li>
200
- </ul>
201
- <ul id="drop1" data-dropdown-content class="f-dropdown">
202
- <li><a href="#">This is a link</a></li>
203
- <li><a href="#">This is another</a></li>
204
- <li><a href="#">Yet another</a></li>
205
- </ul>
206
- <ul id="drop2" data-dropdown-content class="f-dropdown">
207
- <li><a href="#">This is a link</a></li>
208
- <li><a href="#">This is another</a></li>
209
- <li><a href="#">Yet another</a></li>
210
- </ul>
211
- <ul id="drop3" data-dropdown-content class="f-dropdown">
212
- <li><a href="#">This is a link</a></li>
213
- <li><a href="#">This is another</a></li>
214
- <li><a href="#">Yet another</a></li>
215
- </ul>
216
- <ul id="drop4" data-dropdown-content class="f-dropdown">
217
- <li><a href="#">This is a link</a></li>
218
- <li><a href="#">This is another</a></li>
219
- <li><a href="#">Yet another</a></li>
220
- </ul>
221
- <ul id="drop5" data-dropdown-content class="f-dropdown">
222
- <li><a href="#">This is a link</a></li>
223
- <li><a href="#">This is another</a></li>
224
- <li><a href="#">Yet another</a></li>
225
- </ul>
226
- <ul id="drop6" data-dropdown-content class="f-dropdown">
227
- <li><a href="#">This is a link</a></li>
228
- <li><a href="#">This is another</a></li>
229
- <li><a href="#">Yet another</a></li>
230
- </ul>
231
- <ul id="drop7" data-dropdown-content class="f-dropdown">
232
- <li><a href="#">This is a link</a></li>
233
- <li><a href="#">This is another</a></li>
234
- <li><a href="#">Yet another</a></li>
235
- </ul>
239
+ </div>
@@ -10,7 +10,20 @@
10
10
  <h4 class="subheader">In Foundation 4, we wanted to rid our codebase of many different dropdowns within various UI elements. So we created a universal dropdown plugin that will attach dropdowns or popovers next to anything!</h4>
11
11
 
12
12
  <a href="#" class="button" data-dropdown="tinyDrop">Link Dropdown &raquo;</a>
13
+ <ul id="tinyDrop" class="f-dropdown" data-dropdown-content>
14
+ <li><a href="#">This is a link</a></li>
15
+ <li><a href="#">This is another</a></li>
16
+ <li><a href="#">Yet another</a></li>
17
+ </ul>
18
+
13
19
  <a href="#" class="button" data-dropdown="contentDrop">Content Dropdown &raquo;</a>
20
+ <div id="contentDrop" class="f-dropdown content medium" data-dropdown-content>
21
+ <h4>Title</h4>
22
+ <p>Some text that people will think is awesome! Some text that people will think is awesome! Some text that people will think is awesome!</p>
23
+ <img src="../img/demos/demo1.jpg">
24
+ <p>More test.</p>
25
+ <a href="#" class="button">Button</a>
26
+ </div>
14
27
 
15
28
  <hr>
16
29
  </div>
@@ -24,14 +37,13 @@
24
37
 
25
38
  <%= code_example '
26
39
  <a href="#" data-dropdown="drop1">Has Dropdown</a>
27
- <a href="#" data-dropdown="drop2">Has Content Dropdown</a>
28
-
29
40
  <ul id="drop1" class="f-dropdown" data-dropdown-content>
30
41
  <li><a href="#">This is a link</a></li>
31
42
  <li><a href="#">This is another</a></li>
32
43
  <li><a href="#">Yet another</a></li>
33
44
  </ul>
34
45
 
46
+ <a href="#" data-dropdown="drop2">Has Content Dropdown</a>
35
47
  <ul id="drop2" class="f-dropdown content" data-dropdown-content>
36
48
  <li><a href="#">This is a link</a></li>
37
49
  <li><a href="#">This is another</a></li>
@@ -39,9 +51,19 @@
39
51
  </ul>
40
52
  ', :html %>
41
53
 
42
- <p><a href="#" data-dropdown="drop1">Has Dropdown</a> | <a href="#" data-dropdown="drop2">Has Content Dropdown</a></p>
54
+ <p>
55
+ <a href="#" data-dropdown="drop1">Has Dropdown</a> | <a href="#" data-dropdown="drop2">Has Content Dropdown</a>
56
+ <ul id="drop1" data-dropdown-content class="f-dropdown">
57
+ <li><a href="#">This is a link</a></li>
58
+ <li><a href="#">This is another</a></li>
59
+ <li><a href="#">Yet another</a></li>
60
+ </ul>
61
+ <div id="drop2" data-dropdown-content class="f-dropdown content">
62
+ <p>Some text that people will think is awesome! Some text that people will think is awesome! Some text that people will think is awesome!</p>
63
+ </div>
64
+ </p>
43
65
 
44
- <p>You'll notice that <code>data-dropdown="drop1"</code> and <code>id="drop1"</code> have the same value. This is what tells the dropdown plugin where to look to find the position to attach the dropdown.</p>
66
+ <p>You'll notice that <code>data-dropdown="drop1"</code> and <code>id="drop1"</code> have the same value. This is what tells the dropdown plugin where to look to find the position to attach the dropdown. It is best to place your dropdown and target element <strong>within the same offset parent</strong>.</p>
45
67
 
46
68
  <p>Available class options:</p>
47
69
  <ul class="disc">
@@ -120,6 +142,8 @@ $max-width: $f-dropdown-max-width
120
142
  <h5>Default SCSS Variables</h5>
121
143
 
122
144
  <%= code_example '
145
+ $include-html-button-classes: $include-html-classes;
146
+
123
147
  /* We use these to controls height and width styles. */
124
148
  $f-dropdown-max-width: 200px;
125
149
  $f-dropdown-height: auto;
@@ -142,21 +166,21 @@ $f-dropdown-triangle-side-offset: 10px;
142
166
  /* We use these to control styles for the list elements. */
143
167
  $f-dropdown-list-style: none;
144
168
  $f-dropdown-font-color: #555;
145
- $f-dropdown-font-size: emCalc(14px);
146
- $f-dropdown-list-padding: emCalc(5px) emCalc(10px);
147
- $f-dropdown-line-height: emCalc(18px);
169
+ $f-dropdown-font-size: emCalc(14);
170
+ $f-dropdown-list-padding: emCalc(5, 10);
171
+ $f-dropdown-line-height: emCalc(18);
148
172
  $f-dropdown-list-hover-bg: #eeeeee;
149
173
  $dropdown-mobile-default-float: 0;
150
174
 
151
175
  /* We use this to control the styles for when the dropdown has custom content. */
152
- $f-dropdown-content-padding: emCalc(20px);', :css %>
176
+ $f-dropdown-content-padding: emCalc(20);', :css %>
153
177
 
154
178
  <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>. It is included in <strong>_variables.scss</strong>.</p>
155
179
 
156
180
  <hr>
157
181
 
158
182
  <h3>Using the JavaScript</h3>
159
- <p>You'll need to include <code>foundation.joyride.js</code> to get plugin to work. You'll also need to make sure to include <code>zepto.js</code> and <code>foundation.js</code> above the alert plugin. Above your closing <code>&lt;/body&gt;</code> tag include the following line of code and make sure you have the JS in your directory.</p>
183
+ <p>You'll need to include <code>foundation.dropdown.js</code> to get plugin to work. You'll also need to make sure to include <code>zepto.js</code> and <code>foundation.js</code> above the alert plugin. Above your closing <code>&lt;/body&gt;</code> tag include the following line of code and make sure you have the JS in your directory.</p>
160
184
 
161
185
  <p><a href="../javascript.html" title="How to install Foundation JavaScript">Read how to install Foundation JavaScript</a></p>
162
186
 
@@ -166,8 +190,7 @@ $f-dropdown-content-padding: emCalc(20px);', :css %>
166
190
 
167
191
  <p>Dropdown options can only be passed in during initialization at this time.</p>
168
192
 
169
- <%= code_example "
170
- {
193
+ <%= code_example "{
171
194
  // specify the class used for active dropdowns
172
195
  activeClass: 'open'
173
196
  }", :js %>
@@ -180,25 +203,4 @@ $f-dropdown-content-padding: emCalc(20px);', :css %>
180
203
  <div class="large-3 pull-9 columns">
181
204
  <%= render "_sidebar-components.html.erb" %>
182
205
  </div>
183
- </div>
184
-
185
- <ul id="tinyDrop" class="f-dropdown" data-dropdown-content>
186
- <li><a href="#">This is a link</a></li>
187
- <li><a href="#">This is another</a></li>
188
- <li><a href="#">Yet another</a></li>
189
- </ul>
190
- <div id="contentDrop" class="f-dropdown content medium" data-dropdown-content>
191
- <h4>Title</h4>
192
- <p>Some text that people will think is awesome! Some text that people will think is awesome! Some text that people will think is awesome!</p>
193
- <img src="../img/demos/demo1.jpg">
194
- <p>More test.</p>
195
- <a href="#" class="button">Button</a>
196
- </div>
197
- <ul id="drop1" data-dropdown-content class="f-dropdown">
198
- <li><a href="#">This is a link</a></li>
199
- <li><a href="#">This is another</a></li>
200
- <li><a href="#">Yet another</a></li>
201
- </ul>
202
- <div id="drop2" data-dropdown-content class="f-dropdown content">
203
- <p>Some text that people will think is awesome! Some text that people will think is awesome! Some text that people will think is awesome!</p>
204
206
  </div>