zurb-foundation 4.1.5 → 4.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. data/Gemfile.lock +1 -1
  2. data/README.md +4 -0
  3. data/docs/CHANGELOG.md +10 -0
  4. data/docs/components/block-grid.html.erb +1 -1
  5. data/docs/components/grid.html.erb +4 -4
  6. data/docs/components/inline-lists.html.erb +2 -2
  7. data/docs/components/panels.html.erb +2 -2
  8. data/docs/components/pricing-tables.html.erb +1 -1
  9. data/docs/components/progress-bars.html.erb +1 -1
  10. data/docs/components/reveal.html.erb +1 -1
  11. data/docs/components/section.html.erb +546 -19
  12. data/docs/components/split-buttons.html.erb +2 -2
  13. data/docs/components/thumbnails.html.erb +2 -2
  14. data/docs/components/top-bar.html.erb +2 -3
  15. data/docs/components/type.html.erb +5 -5
  16. data/docs/components/visibility.html.erb +1 -1
  17. data/docs/css/docs.scss +54 -0
  18. data/docs/sass.html.erb +3 -1
  19. data/js/foundation/foundation.forms.js +311 -227
  20. data/js/foundation/foundation.joyride.js +10 -8
  21. data/js/foundation/foundation.js +1 -1
  22. data/js/foundation/foundation.section.js +4 -4
  23. data/lib/foundation/version.rb +1 -1
  24. data/scss/foundation/_variables.scss +185 -171
  25. data/scss/foundation/components/_alert-boxes.scss +1 -0
  26. data/scss/foundation/components/_block-grid.scss +2 -4
  27. data/scss/foundation/components/_breadcrumbs.scss +1 -0
  28. data/scss/foundation/components/_button-groups.scss +1 -0
  29. data/scss/foundation/components/_buttons.scss +1 -0
  30. data/scss/foundation/components/_clearing.scss +154 -151
  31. data/scss/foundation/components/_custom-forms.scss +35 -21
  32. data/scss/foundation/components/_dropdown-buttons.scss +2 -1
  33. data/scss/foundation/components/_dropdown.scss +2 -1
  34. data/scss/foundation/components/_flex-video.scss +1 -0
  35. data/scss/foundation/components/_forms.scss +1 -0
  36. data/scss/foundation/components/_global.scss +75 -84
  37. data/scss/foundation/components/_grid.scss +9 -8
  38. data/scss/foundation/components/_inline-lists.scss +2 -1
  39. data/scss/foundation/components/_joyride.scss +165 -160
  40. data/scss/foundation/components/_keystrokes.scss +2 -1
  41. data/scss/foundation/components/_labels.scss +1 -0
  42. data/scss/foundation/components/_magellan.scss +2 -0
  43. data/scss/foundation/components/_orbit.scss +158 -154
  44. data/scss/foundation/components/_pagination.scss +1 -0
  45. data/scss/foundation/components/_panels.scss +1 -0
  46. data/scss/foundation/components/_pricing-tables.scss +1 -0
  47. data/scss/foundation/components/_progress-bars.scss +1 -0
  48. data/scss/foundation/components/_reveal.scss +2 -1
  49. data/scss/foundation/components/_section.scss +108 -93
  50. data/scss/foundation/components/_side-nav.scss +2 -1
  51. data/scss/foundation/components/_split-buttons.scss +1 -0
  52. data/scss/foundation/components/_sub-nav.scss +1 -0
  53. data/scss/foundation/components/_switch.scss +4 -2
  54. data/scss/foundation/components/_tables.scss +7 -3
  55. data/scss/foundation/components/_thumbs.scss +1 -0
  56. data/scss/foundation/components/_tooltips.scss +85 -81
  57. data/scss/foundation/components/_top-bar.scss +323 -318
  58. data/scss/foundation/components/_type.scss +290 -286
  59. data/scss/foundation/components/_visibility.scss +2 -0
  60. data/templates/project/index.html +0 -1
  61. data/templates/project/manifest.rb +0 -1
  62. data/templates/project/scss/app.scss +3 -0
  63. metadata +4 -4
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zurb-foundation (4.1.5)
4
+ zurb-foundation (4.1.6)
5
5
  sass (>= 3.2.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -78,6 +78,10 @@ CodeIgniter
78
78
 
79
79
  * [Responsive CodeIgniter BoilerPlate](https://github.com/meridiansoftech/meridian_ci_codebase) by [Arnold Mwumva Ford](https://twitter.com/fordarnold) , Meridian Softech
80
80
 
81
+ Shopify
82
+
83
+ * [Foundationify Shopify Theme](https://github.com/lukebussey/foundationify) by Luke Bussey
84
+
81
85
  Other Implementations
82
86
 
83
87
  * [Mobile First](https://github.com/adamfairhead/mobile-first-foundation) by Adam Fairhead
@@ -1,6 +1,16 @@
1
+ ### 4.1.6- May 6, 2013
2
+ * Improved performance for custom select boxes.
3
+ * Bug fix for switches contained within custom forms.
4
+ * Bug fix for directly clicking on checkbox to toggle it
5
+ * Sections are now semantic.
6
+
7
+ You can compare the commits [here](https://github.com/zurb/foundation/compare/v4.1.5...v4.1.6).
8
+
1
9
  ### 4.1.5- April 26, 2013
2
10
  * Add support for `indexOf` in legacy browsers
3
11
 
12
+ You can compare the commits [here](https://github.com/zurb/foundation/compare/v4.1.4...v4.1.5).
13
+
4
14
  ### 4.1.4- April 26, 2013
5
15
  * Fixes invalid Rails generator path
6
16
 
@@ -21,7 +21,7 @@
21
21
  <h3>Building With Predefined HTML Classes</h3>
22
22
  <p>Block grids are made from a <code>ul.small-block-grid-#</code> or <code>ul.large-block-grid-#</code>. These are ideal for blocked-in content generated by an application, as they do not require rows or even numbers of elements to display correctly.</p>
23
23
 
24
- <p>These have a bit of flexibility since you have access to two separate grids between our built in 768px breakpoint. If you use the <code>small-block-grid</code> only, the grid will keep its spacing and configuration no matter the screen size. If you use <code>large-block-grid</code> only, the list items will stack on top of eachother for small devices. If you use both of those classes combined, you can control the configuration and layout separately for each breakpoint.</p>
24
+ <p>These have a bit of flexibility since you have access to two separate grids between our built in 768px breakpoint. If you use the <code>small-block-grid</code> only, the grid will keep its spacing and configuration no matter the screen size. If you use <code>large-block-grid</code> only, the list items will stack on top of each other for small devices. If you use both of those classes combined, you can control the configuration and layout separately for each breakpoint.</p>
25
25
 
26
26
  <%= code_example '
27
27
  <!-- Using only the small-block-grid -->
@@ -167,14 +167,14 @@
167
167
  <hr>
168
168
 
169
169
  <h4>Centered Columns</h4>
170
- <p>Centered columns are placed in the middle of the row. This does not center their content, but centers the grid element, itself. This is accomplished by adding a class of <code>large-centered</code> or <code>small-centered</code> depending on which breakpoint you want the columns to center on. Small versions will carry through all breakpoints if not overridden by a large version. You can center any number of columns you have.</p>
170
+ <p>Centered columns are placed in the middle of the row. This does not center their content, but centers the grid element, itself. This is accomplished by adding a class of <code>large-centered</code> or <code>small-centered</code> depending on which breakpoint you want the columns to center on. Small versions will carry through all breakpoints if not overridden by a large version. You can center any number of columns you have. To have a column not carry it's small-centered to large, add a class of <code>large-uncentered</code>.</p>
171
171
 
172
172
  <%= code_example '
173
173
  <div class="row">
174
174
  <div class="small-3 small-centered columns">3 centered</div>
175
175
  </div>
176
176
  <div class="row">
177
- <div class="small-6 small-centered columns">6 centered</div>
177
+ <div class="small-6 large-centered columns">6 centered</div>
178
178
  </div>
179
179
  <div class="row">
180
180
  <div class="small-9 small-centered columns">9 centered</div>
@@ -187,10 +187,10 @@
187
187
  <div class="small-3 small-centered columns">3 centered</div>
188
188
  </div>
189
189
  <div class="row display">
190
- <div class="small-6 small-centered columns">6 centered</div>
190
+ <div class="small-6 large-centered columns">6 centered, large</div>
191
191
  </div>
192
192
  <div class="row display">
193
- <div class="small-9 small-centered columns">9 centered</div>
193
+ <div class="small-9 small-centered large-uncentered columns">9 centered small</div>
194
194
  </div>
195
195
  <div class="row display">
196
196
  <div class="small-11 small-centered columns">11 centered</div>
@@ -75,7 +75,7 @@ $inline-list-overflow: hidden;
75
75
  /* We use this to control the list items */
76
76
  $inline-list-display: block;
77
77
 
78
- /* We use this to control any elments within list items */
78
+ /* We use this to control any elements within list items */
79
79
  $inline-list-children-display: block;', :css %>
80
80
 
81
81
  <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>_foundation-global.scss</strong>.</p>
@@ -88,4 +88,4 @@ $inline-list-children-display: block;', :css %>
88
88
  <%= render "_sidebar-components.html.erb" %>
89
89
  </div>
90
90
 
91
- </div>
91
+ </div>
@@ -37,7 +37,7 @@
37
37
  <p>Available HTML class options:</p>
38
38
  <ul class="disc">
39
39
  <li>Adding <code>.callout</code> to your panel will make it our default blue and add a shiny top edge to help it stand out.</li>
40
- <li>You may also you <code>.radius</code> to add a tasteful border-radius to thie mix.</li>
40
+ <li>You may also you <code>.radius</code> to add a tasteful border-radius to the mix.</li>
41
41
  </ul>
42
42
 
43
43
  <%= code_example '
@@ -120,4 +120,4 @@ $panel-font-color-alt: #fff;', :css %>
120
120
  <div class="large-3 pull-9 columns">
121
121
  <%= render "_sidebar-components.html.erb" %>
122
122
  </div>
123
- </div>
123
+ </div>
@@ -37,7 +37,7 @@
37
37
  <ul class="disc">
38
38
  <li><code>&lt;li class="title"&gt;</code>: Creates the styles for a title.</li>
39
39
  <li><code>&lt;li class="price"&gt;</code>: Add a price that stands out.</li>
40
- <li><code>&lt;li class="description"&gt;</code>: If you need to descript the plan, add this.</li>
40
+ <li><code>&lt;li class="description"&gt;</code>: If you need to describe the plan, add this.</li>
41
41
  <li><code>&lt;li class="bullet-item"&gt;</code>: To call out features, use this list item.</li>
42
42
  <li><code>&lt;li class="cta-button"&gt;</code>: To add a button inside a list item, use this.</li>
43
43
  </ul>
@@ -22,7 +22,7 @@
22
22
  <div class="large-12 columns">
23
23
 
24
24
  <h3>Build With Predefined HTML Classes</h3>
25
- <p>There are two ways to add progress bars labels in Foundation 4: with our predefined HTML classes or with our mixins. Building progress bars using our predefined classes is simple, you'll just need to write a <code>&lt;div class="progress"&gt;</code> and inside of that a <code>&lt;span class="meter"&gt;</code>. The meter is the element that you can set a width to, either inline or programatically on your own accord. The simplest way to do this is to change the <code>style="width:%"</code> property on the meter, itself.</p>
25
+ <p>There are two ways to add progress bars labels in Foundation 4: with our predefined HTML classes or with our mixins. Building progress bars using our predefined classes is simple, you'll just need to write a <code>&lt;div class="progress"&gt;</code> and inside of that a <code>&lt;span class="meter"&gt;</code>. The meter is the element that you can set a width to, either inline or programmatically on your own accord. The simplest way to do this is to change the <code>style="width:%"</code> property on the meter, itself.</p>
26
26
 
27
27
  <%= code_example '
28
28
  <div class="progress"><span class="meter"></span></div>', :html %>
@@ -93,7 +93,7 @@ $reveal-border-color: #666;', :css %>
93
93
  <hr>
94
94
 
95
95
  <h3>Using the JavaScript</h3>
96
- <p>You don't need ths JS to create reveal modals with Foundation. The only reason you'll need to include <code>foundation.reveal.js</code> is if you want to add the ability to close an alert. 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>
96
+ <p>You don't need this JS to create reveal modals with Foundation. The only reason you'll need to include <code>foundation.reveal.js</code> is if you want to add the ability to close an alert. 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>
97
97
 
98
98
  <p><a href="../javascript.html" title="How to install Foundation JavaScript">Read how to install Foundation JavaScript</a></p>
99
99
 
@@ -8,7 +8,6 @@
8
8
  <div class="large-12 columns">
9
9
  <h2><%= @page_title %></h2>
10
10
  <h4 class="subheader">Sections are similar to tabs as a way to selectively show a single panel of content at a time.</h4>
11
-
12
11
  <div class="row">
13
12
  <div class="large-3 columns">
14
13
  <div class="section-container vertical-nav" data-section="vertical-nav" data-options="one_up: false;">
@@ -122,7 +121,7 @@
122
121
  <div class="large-12 columns">
123
122
 
124
123
  <h3>Build With Predefined HTML Classes</h3>
125
- <p>There are two ways to build sections in Foundation 4, with our predefined HTML classes or with our structure and mixins. Building a sections using our predefined classes is super-easy, you just need to create a <code>&lt;div class="section-container" data-section&gt;</code> as a wrapper for the sections themselves. Inside of this wrapper, you'll create either a <code>&lt;section class="section"&gt;</code> or <code>&lt;div class="section"&gt;</code>. Within that you'll include some sort of <code>.title</code> (this can be headers or a paragragh) and a <code>&lt;div class="content"&gt;</code>. Here is the markup you'll need:</p>
124
+ <p>There are two ways to build sections in Foundation 4, with our predefined HTML classes or with our structure and mixins. Building a sections using our predefined classes is super-easy, you just need to create a <code>&lt;div class="section-container" data-section&gt;</code> as a wrapper for the sections themselves. Inside of this wrapper, you'll create either a <code>&lt;section class="section"&gt;</code> or <code>&lt;div class="section"&gt;</code>. Within that you'll include some sort of <code>.title</code> (this can be headers or a paragraph) and a <code>&lt;div class="content"&gt;</code>. Here is the markup you'll need:</p>
126
125
 
127
126
  <p>If you want to use ZURB's default styles for section elements you can apply the <code>auto</code>, <code>tabs</code>, <code>accordion</code>, <code>vertical-nav</code>, or <code>horizontal-nav</code> classes. By default, section elements will be an accordion on mobile and tabs on desktops and tablets. If you want to adjust this behavior and force a particular format for your section, you will need to set <code>data-section</code> equal to the format you want to force as shown in the variations below.</p>
128
127
 
@@ -141,6 +140,20 @@
141
140
  </div>
142
141
  </section>
143
142
  </div>', :html %>
143
+ <div class="section-container auto" data-section>
144
+ <section>
145
+ <p class="title" data-section-title><a href="#panel1">Section 1</a></p>
146
+ <div class="content" data-section-content>
147
+ <p>Content of section 1.</p>
148
+ </div>
149
+ </section>
150
+ <section>
151
+ <p class="title" data-section-title><a href="#panel2">Section 2</a></p>
152
+ <div class="content" data-section-content>
153
+ <p>Content of section 2.</p>
154
+ </div>
155
+ </section>
156
+ </div>
144
157
  <p>This example will automatically switch between tabs and accordion based on the resolution of the device.</p>
145
158
 
146
159
  <p>The class options:</p>
@@ -174,6 +187,20 @@
174
187
  </div>
175
188
  </section>
176
189
  </div>', :html %>
190
+ <div class="section-container accordion" data-section="accordion">
191
+ <section>
192
+ <p class="title" data-section-title><a href="#">Section 1</a></p>
193
+ <div class="content" data-section-content>
194
+ <p>Content of section 1.</p>
195
+ </div>
196
+ </section>
197
+ <section>
198
+ <p class="title" data-section-title><a href="#">Section 2</a></p>
199
+ <div class="content" data-section-content>
200
+ <p>Content of section 2.</p>
201
+ </div>
202
+ </section>
203
+ </div>
177
204
 
178
205
  <h6>Tabs</h6>
179
206
  <p>Adding a <code>tabs</code> class to the section container will enable tabs on both small and large screens.</p>
@@ -193,6 +220,21 @@
193
220
  </section>
194
221
  </div>', :html %>
195
222
 
223
+ <div class="section-container tabs" data-section="tabs">
224
+ <section>
225
+ <p class="title" data-section-title><a href="#">Section 1</a></p>
226
+ <div class="content" data-section-content>
227
+ <p>Content of section 1.</p>
228
+ </div>
229
+ </section>
230
+ <section>
231
+ <p class="title" data-section-title><a href="#">Section 2</a></p>
232
+ <div class="content" data-section-content>
233
+ <p>Content of section 2.</p>
234
+ </div>
235
+ </section>
236
+ </div>
237
+
196
238
  <h6>Vertical Tabs</h6>
197
239
  <p>Adding a <code>vertical-tabs</code> class to the section container and setting <code>data-section="vertical-tabs"</code> will enable tabs on both small and large screens.</p>
198
240
 
@@ -210,8 +252,35 @@
210
252
  <p>Content of section 2.</p>
211
253
  </div>
212
254
  </section>
255
+ <section>
256
+ <p class="title" data-section-title><a href="#">Section 3</a></p>
257
+ <div class="content" data-section-content>
258
+ <p>Content of section 3.</p>
259
+ </div>
260
+ </section>
213
261
  </div>', :html %>
214
262
 
263
+ <div class="section-container vertical-tabs" data-section="vertical-tabs">
264
+ <section>
265
+ <p class="title" data-section-title><a href="#">Section 1</a></p>
266
+ <div class="content" data-section-content>
267
+ <p>Content of section 1.</p>
268
+ </div>
269
+ </section>
270
+ <section>
271
+ <p class="title" data-section-title><a href="#">Section 2</a></p>
272
+ <div class="content" data-section-content>
273
+ <p>Content of section 2.</p>
274
+ </div>
275
+ </section>
276
+ <section>
277
+ <p class="title" data-section-title><a href="#">Section 3</a></p>
278
+ <div class="content" data-section-content>
279
+ <p>Content of section 3.</p>
280
+ </div>
281
+ </section>
282
+ </div>
283
+
215
284
  <h6>Vertical Nav/Accordion</h6>
216
285
  <p>Adding a <code>vertical-nav</code> class to the section container will enable vertical navigation elements on large screens and show an accordion on small screens.</p>
217
286
 
@@ -254,6 +323,40 @@
254
323
  </div>
255
324
  </div>', :html %>
256
325
 
326
+ <div class="row">
327
+ <div class="large-3 columns">
328
+ <div class="section-container vertical-nav" data-section="vertical-nav" data-options="one_up: false;">
329
+ <section>
330
+ <p class="title" data-section-title><a href="#">Section 1</a></p>
331
+ <div class="content" data-section-content>
332
+ <ul class="side-nav">
333
+ <li><a href="#">Link 1</a></li>
334
+ <li><a href="#">Link 2</a></li>
335
+ <li><a href="#">Link 3</a></li>
336
+ <li class="divider"></li>
337
+ <li><a href="#">Link 1</a></li>
338
+ </ul>
339
+ </div>
340
+ </section>
341
+ <section>
342
+ <p class="title" data-section-title><a href="#">Section 2</a></p>
343
+ <div class="content" data-section-content>
344
+ <ul class="side-nav">
345
+ <li><a href="#">Link 1</a></li>
346
+ <li><a href="#">Link 2</a></li>
347
+ <li><a href="#">Link 3</a></li>
348
+ <li class="divider"></li>
349
+ <li><a href="#">Link 1</a></li>
350
+ </ul>
351
+ </div>
352
+ </section>
353
+ </div>
354
+ </div>
355
+ <div class="large-9 columns">
356
+ <p>Content to the right of the navigation.</p>
357
+ </div>
358
+ </div>
359
+
257
360
  <h6>Horizontal Nav/Nav Bar</h6>
258
361
  <p>Adding a <code>horizontal-nav</code> class to the section container will enable horizontal navigation elements on large screens and show an accordion on small screens.</p>
259
362
 
@@ -290,6 +393,32 @@
290
393
  </div>
291
394
  ', :html %>
292
395
 
396
+ <div class="section-container horizontal-nav" data-section="horizontal-nav" data-options="one_up: false;">
397
+ <section>
398
+ <p class="title" data-section-title><a href="#">Section 1</a></p>
399
+ <div class="content" data-section-content>
400
+ <ul class="side-nav">
401
+ <li><a href="#">Link 1</a></li>
402
+ <li><a href="#">Link 2</a></li>
403
+ <li><a href="#">Link 3</a></li>
404
+ <li class="divider"></li>
405
+ <li><a href="#">Link 1</a></li>
406
+ </ul>
407
+ </div>
408
+ </section>
409
+ <section>
410
+ <p class="title" data-section-title><a href="#">Section 2</a></p>
411
+ <div class="content" data-section-content>
412
+ <ul class="side-nav">
413
+ <li><a href="#">Link 1</a></li>
414
+ <li><a href="#">Link 2</a></li>
415
+ <li><a href="#">Link 3</a></li>
416
+ <li class="divider"></li>
417
+ <li><a href="#">Link 1</a></li>
418
+ </ul>
419
+ </div>
420
+ </section>
421
+ </div>
293
422
 
294
423
  <h6>Deep Linking</h6>
295
424
  <p>Set <code>deep-linking</code> to true to enable deep linking to sections of content. Deep linking allows visitors to visit a predefined URL with a hash that points to a particular section of the content. Deep linking also requires a matching <code>data-slug</code> on the content section that the hash should point to, without the pound (&#35;) sign.</p>
@@ -376,7 +505,7 @@
376
505
 
377
506
  <hr>
378
507
 
379
- <!-- <h3>Building with Mixins</h3>
508
+ <h3>Building with Mixins</h3>
380
509
  <p>If you are keen on SCSS and use it for your Foundation projects, you have access to mixins that will let you create any type of section you want and change it within a media query too! Building a section with our mixins requires a bit of predefined structure, but you can choose the classes or ID's to style them with. Start with some sort of block-level container, we use a <code>&lt;div&gt;</code>. This container needs to have <code>data-section="type-of-section"</code>. The section types are explained above. Inside this you create "sections", which can be an HTML5 <code>section</code> element or a <code>&lt;div class="section"&gt;</code>, that will hold content.<p>
381
510
 
382
511
  <h5>Title and Content Elements</h5>
@@ -392,37 +521,435 @@
392
521
  <p>Content of section 1.</p>
393
522
  </div>
394
523
  </section>
395
- <div data-section-region>
524
+ <section class="your-section-class">
396
525
  <p class="your-title-class" data-section-title><a href="#section2">Section 2</a></p>
397
526
  <div class="your-content-class" data-slug="section2" data-section-content>
398
527
  <p>Content of section 2.</p>
399
- </div>
528
+ </section>
400
529
  </div>
401
530
  </div>', :html %>
402
531
 
403
- <hr> -->
532
+ <p>Here's a look at the available options for the mixins you need to create sections:</p>
533
+
534
+ <%= code_example '
535
+ @include section-container($base-style, $section-type) { ... }
536
+
537
+ /* Container Options */
538
+
539
+ /* This controls whether or not you include default styles when chaining classes, set to true or false */
540
+ $base-style: true
541
+
542
+ /* This controls the style for the section you are using: accordion, tabs, vertical-tabs, vertical-nav, horizontal-nav */
543
+ $section-type: accordion
544
+
545
+ @include section($section-type, $title-selector, $content-selector, $title-padding, $title-color, $title-font-size, $title-bg, $title-bg-hover, $title-bg-active, $title-color-active, $content-bg, $content-padding, $section-border-size, $section-border-style, $section-border-color) { ... }
546
+
547
+ /* Section Options */
548
+
549
+ /* Control which section type styles come across: accordion, tabs, vertical-tabs, vertical-nav, horizontal-nav */
550
+ $section-type: accordion
551
+
552
+ /* You can set the class that is used for the title elements */
553
+ $title-selector: ".title"
554
+
555
+ /* You can set the class that is used for the content elements */
556
+ $content-selector: ".content"
557
+
558
+ /* Give the titles some padding, can be any px or emCalc() value */
559
+ $title-padding: $section-padding
560
+
561
+ /* give the titles a color, any color value */
562
+ $title-color: $section-title-color
563
+
564
+ /* Set the font size for titles */
565
+ $title-font-size: $section-font-size
566
+
567
+ /* Set the background color for titles */
568
+ $title-bg: $section-title-bg
569
+
570
+ /* Change title background for hover */
571
+ $title-bg-hover: $section-title-bg-hover
572
+
573
+ /* Change title background for .active */
574
+ $title-bg-active: $section-title-bg-active
575
+
576
+ /* Change title color for .active */
577
+ $title-color-active: $section-title-color
578
+
579
+ /* Content area background color */
580
+ $content-bg: $section-content-bg
581
+
582
+ /* Content area padding */
583
+ $content-padding: $section-content-padding
584
+
585
+ /* Border size in pixels */
586
+ $section-border-size: $section-border-size
587
+
588
+ /* Border style */
589
+ $section-border-style: $section-border-style
590
+
591
+ /* Border color */
592
+ $section-border-color: $section-border-color', :css %>
593
+
594
+
595
+ <hr>
596
+
597
+ <h5>Auto Configuration</h5>
598
+ <p>The default use case for our section plugin is to create accordions on small screens and tabs on large screens.</p>
599
+ <%= code_example '
600
+ <div class="section-auto-sample" data-section="auto">
601
+ <section>
602
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
603
+ <div class="content-sample" data-slug="section1" data-section-content>
604
+ <p>Content of section 1.</p>
605
+ </div>
606
+ </section>
607
+ <section>
608
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
609
+ <div class="content-sample" data-slug="section2" data-section-content>
610
+ <p>Content of section 2.</p>
611
+ </div>
612
+ </section>
613
+ </div>', :html %>
614
+
615
+ <%= code_example '
616
+ .section-auto-sample {
617
+ @include section-container($section-type:accordion);
618
+ & > section { @include section($section-type:accordion, $title-selector:".title-sample", $content-selector:".content-sample"); }
619
+
620
+ @media #{$small} {
621
+ @include section-container(false,$section-type:tabs);
622
+ & > section { @include section($section-type:tabs, $title-selector:".title-sample", $content-selector:".content-sample"); }
623
+ }
624
+ }', :css %>
625
+
626
+ <div class="section-auto-sample" data-section="auto">
627
+ <section>
628
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
629
+ <div class="content-sample" data-slug="section1" data-section-content>
630
+ <p>Content of section 1.</p>
631
+ </div>
632
+ </section>
633
+ <section>
634
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
635
+ <div class="content-sample" data-slug="section2" data-section-content>
636
+ <p>Content of section 2.</p>
637
+ </div>
638
+ </section>
639
+ </div>
640
+
641
+ <hr>
642
+
643
+ <h5>Accordion Configuration</h5>
644
+ <p>You can have your section act like an accordion the entire time, like so:</p>
645
+ <%= code_example '
646
+ <div class="section-auto-sample-accordion" data-section="accordion">
647
+ <section>
648
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
649
+ <div class="content-sample" data-slug="section1" data-section-content>
650
+ <p>Content of section 1.</p>
651
+ </div>
652
+ </section>
653
+ <section>
654
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
655
+ <div class="content-sample" data-slug="section2" data-section-content>
656
+ <p>Content of section 2.</p>
657
+ </div>
658
+ </section>
659
+ </div>', :html %>
660
+
661
+ <%= code_example '
662
+ .section-auto-sample-accordion {
663
+ @include section-container($section-type:accordion);
664
+ & > section { @include section($section-type:accordion, $title-selector:".title-sample", $content-selector:".content-sample"); }
665
+ }', :css %>
666
+
667
+ <div class="section-auto-sample-accordion" data-section="accordion">
668
+ <section>
669
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
670
+ <div class="content-sample" data-slug="section1" data-section-content>
671
+ <p>Content of section 1.</p>
672
+ </div>
673
+ </section>
674
+ <section>
675
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
676
+ <div class="content-sample" data-slug="section2" data-section-content>
677
+ <p>Content of section 2.</p>
678
+ </div>
679
+ </section>
680
+ </div>
681
+
682
+ <hr>
683
+
684
+ <h5>Tabs Configuration</h5>
685
+ <p>You can have your section act like tabs the entire time, like so:</p>
686
+ <%= code_example '
687
+ <div class="section-auto-sample-tabs" data-section="tabs">
688
+ <section>
689
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
690
+ <div class="content-sample" data-slug="section1" data-section-content>
691
+ <p>Content of section 1.</p>
692
+ </div>
693
+ </section>
694
+ <section>
695
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
696
+ <div class="content-sample" data-slug="section2" data-section-content>
697
+ <p>Content of section 2.</p>
698
+ </div>
699
+ </section>
700
+ </div>', :html %>
701
+
702
+ <%= code_example '
703
+ .section-auto-sample-tabs {
704
+ @include section-container($section-type:tabs);
705
+ & > section { @include section($section-type:tabs, $title-selector:".title-sample", $content-selector:".content-sample"); }
706
+ }', :css %>
707
+
708
+ <div class="section-auto-sample-tabs" data-section="tabs">
709
+ <section>
710
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
711
+ <div class="content-sample" data-slug="section1" data-section-content>
712
+ <p>Content of section 1.</p>
713
+ </div>
714
+ </section>
715
+ <section>
716
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
717
+ <div class="content-sample" data-slug="section2" data-section-content>
718
+ <p>Content of section 2.</p>
719
+ </div>
720
+ </section>
721
+ </div>
722
+
723
+ <hr>
724
+
725
+ <h5>Vertical Tabs Configuration</h5>
726
+ <p>You can have your section act like vertical tabs on large screen and go back to accordion on small screens, like so:</p>
727
+ <%= code_example '
728
+ <div class="section-auto-sample-vtabs" data-section="vertical-tabs">
729
+ <section>
730
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
731
+ <div class="content-sample" data-slug="section1" data-section-content>
732
+ <p>Content of section 1.</p>
733
+ </div>
734
+ </section>
735
+ <section>
736
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
737
+ <div class="content-sample" data-slug="section2" data-section-content>
738
+ <p>Content of section 2.</p>
739
+ </div>
740
+ </section>
741
+ </div>', :html %>
742
+
743
+ <%= code_example '
744
+ .section-auto-sample-vtabs {
745
+ @include section-container($section-type:accordion);
746
+ & > section { @include section($section-type:accordion, $title-selector:".title-sample", $content-selector:".content-sample"); }
747
+ }
748
+ @media #{$small} {
749
+ .section-auto-sample-vtabs {
750
+ @include section-container($section-type:vertical-tabs);
751
+ & > section { @include section($section-type:vertical-tabs, $title-selector:".title-sample", $content-selector:".content-sample"); }
752
+ }
753
+ }', :css %>
754
+
755
+ <div class="section-auto-sample-vtabs" data-section="vertical-tabs">
756
+ <section>
757
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
758
+ <div class="content-sample" data-slug="section1" data-section-content>
759
+ <p>Content of section 1.</p>
760
+ </div>
761
+ </section>
762
+ <section>
763
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
764
+ <div class="content-sample" data-slug="section2" data-section-content>
765
+ <p>Content of section 2.</p>
766
+ </div>
767
+ </section>
768
+ </div>
769
+
770
+ <hr>
771
+
772
+ <h5>Vertical Nav Configuration</h5>
773
+ <p>You can have your section act like vertical navigation the entire time, like so:</p>
774
+ <%= code_example '
775
+ <div class="nav-container">
776
+ <nav>
777
+ <div class="section-auto-sample-vnav" data-section="vertical-nav">
778
+ <section>
779
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
780
+ <div class="content-sample" data-slug="section1" data-section-content>
781
+ <p>Content of section 1.</p>
782
+ </div>
783
+ </section>
784
+ <section>
785
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
786
+ <div class="content-sample" data-slug="section2" data-section-content>
787
+ <p>Content of section 2.</p>
788
+ </div>
789
+ </section>
790
+ </div>
791
+ </nav>
792
+ <section class="page-content">
793
+ <p>Content...</p>
794
+ </section>
795
+ </div>', :html %>
796
+
797
+ <%= code_example '
798
+ .nav-container { @include grid-row($behavior:nest);
799
+ > nav { @include grid-column($columns:4); }
800
+ }
801
+
802
+ .section-auto-sample-vnav {
803
+ @include section-container($section-type:accordion);
804
+ & > section { @include section($section-type:accordion, $title-selector:".title-sample", $content-selector:".content-sample"); }
805
+ }
806
+ @media #{$small} {
807
+ .section-auto-sample-vnav {
808
+ @include section-container($section-type:vertical-nav);
809
+ & > section { @include section($section-type:vertical-nav, $title-selector:".title-sample", $content-selector:".content-sample"); }
810
+ }
811
+ }', :css %>
812
+
813
+ <div class="nav-container">
814
+ <nav>
815
+ <div class="section-auto-sample-vnav" data-section="vertical-nav">
816
+ <section>
817
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
818
+ <div class="content-sample" data-slug="section1" data-section-content>
819
+ <p>Content of section 1.</p>
820
+ </div>
821
+ </section>
822
+ <section>
823
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
824
+ <div class="content-sample" data-slug="section2" data-section-content>
825
+ <p>Content of section 2.</p>
826
+ </div>
827
+ </section>
828
+ </div>
829
+ </nav>
830
+ <section class="page-content">
831
+ <p>Content...</p>
832
+ </section>
833
+ </div>
834
+ <hr>
835
+
836
+ <h5>Horizontal Nav Configuration</h5>
837
+ <p>You can have your section act like horizontal navigation the entire time, like so:</p>
838
+ <%= code_example '
839
+ <div class="section-auto-sample-hnav" data-section="horizontal-nav">
840
+ <section>
841
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
842
+ <div class="content-sample" data-slug="section1" data-section-content>
843
+ <p>Content of section 1.</p>
844
+ </div>
845
+ </section>
846
+ <section>
847
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
848
+ <div class="content-sample" data-slug="section2" data-section-content>
849
+ <p>Content of section 2.</p>
850
+ </div>
851
+ </section>
852
+ </div>', :html %>
853
+
854
+ <%= code_example '
855
+ .section-auto-sample-hnav {
856
+ @include section-container($section-type:accordion);
857
+ & > section { @include section($section-type:accordion, $title-selector:".title-sample", $content-selector:".content-sample"); }
858
+ }
859
+ @media #{$small} {
860
+ .section-auto-sample-hnav {
861
+ @include section-container($section-type:horizontal-nav);
862
+ & > section { @include section($section-type:horizontal-nav, $title-selector:".title-sample", $content-selector:".content-sample"); }
863
+ }
864
+ }', :css %>
865
+
866
+ <div class="section-auto-sample-hnav" data-section="horizontal-nav">
867
+ <section>
868
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
869
+ <div class="content-sample" data-slug="section1" data-section-content>
870
+ <p>Content of section 1.</p>
871
+ </div>
872
+ </section>
873
+ <section>
874
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
875
+ <div class="content-sample" data-slug="section2" data-section-content>
876
+ <p>Content of section 2.</p>
877
+ </div>
878
+ </section>
879
+ </div>
880
+
881
+ <hr>
882
+
883
+ <h5>Custom Styles Using the Mixin</h5>
884
+ <p>You have access to a few options that will make styling the sections really easy and you can add onto it as you want. You'll still need the data-section attribute to match the style you give the mixin.</p>
885
+ <%= code_example '
886
+ <div class="section-auto-sample-custom" data-section="tabs">
887
+ <section>
888
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
889
+ <div class="content-sample" data-slug="section1" data-section-content>
890
+ <p>Content of section 1.</p>
891
+ </div>
892
+ </section>
893
+ <section>
894
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
895
+ <div class="content-sample" data-slug="section2" data-section-content>
896
+ <p>Content of section 2.</p>
897
+ </div>
898
+ </section>
899
+ </div>', :html %>
900
+
901
+ <%= code_example '
902
+ .section-auto-sample-custom {
903
+ @include section-container($section-type:tabs);
904
+ & > section { @include section($section-type:tabs, $title-selector:".title-sample", $content-selector:".content-sample", $title-padding: 10px 50px, $title-color:#000, $title-bg:pink, $title-bg-hover:darken(pink,5%), $title-bg-active: #fff, $title-color-active: darken(pink,10%)); }
905
+ }', :css %>
906
+
907
+ <div class="section-auto-sample-custom" data-section="tabs">
908
+ <section>
909
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
910
+ <div class="content-sample" data-slug="section1" data-section-content>
911
+ <p>Content of section 1.</p>
912
+ </div>
913
+ </section>
914
+ <section>
915
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
916
+ <div class="content-sample" data-slug="section2" data-section-content>
917
+ <p>Content of section 2.</p>
918
+ </div>
919
+ </section>
920
+ </div>
921
+
922
+ <hr>
404
923
 
405
924
  <h5>Default SCSS Variables</h5>
406
925
  <%= code_example '
926
+ $include-html-section-classes: $include-html-classes !default;
927
+
407
928
  /* We use these to set padding and hover factor */
408
- $section-padding: emCalc(15px);
409
- $section-function-factor: 10%;
929
+ $section-title-padding: emCalc(15px);
930
+ $section-content-padding: emCalc(15px);
931
+ $section-function-factor: 10%;
410
932
 
411
933
  /* These style the titles */
412
- $section-title-color: #333;
413
- $section-title-bg: #efefef;
414
- $section-title-bg-active: darken($section-title-bg, $section-function-factor);
415
- $section-title-bg-active-tabs: #fff;
934
+ $section-title-color: #333;
935
+ $section-title-bg: #efefef;
936
+ $section-title-bg-active: darken($section-title-bg, $section-function-factor);
937
+ $section-title-bg-active-tabs: #fff;
938
+ $section-title-bg-hover: darken($section-title-bg, $section-function-factor/2);
416
939
 
417
940
  /* Want to control border size, here ya go! */
418
- $section-border-size: 1px;
419
- $section-border-style: solid;
420
- $section-border-color: #ccc;
941
+ $section-border-size: 1px;
942
+ $section-border-style: solid;
943
+ $section-border-color: #ccc;
944
+
945
+ /* Font controls */
946
+ $section-font-size: emCalc(14px);
421
947
 
422
948
  /* Control the color of the background and some size options */
423
- $section-content-bg: #fff;
424
- $section-vertical-nav-min-width: emCalc(200px);
425
- $section-bottom-margin: emCalc(20px);
949
+ $section-content-bg: #fff;
950
+ $section-vertical-nav-min-width: emCalc(200px);
951
+ $section-vertical-tabs-title-width: emCalc(200px);
952
+ $section-bottom-margin: emCalc(20px);
426
953
  ', :css %>
427
954
 
428
955
  <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>.</p>
@@ -466,7 +993,7 @@ $section-bottom-margin: emCalc(20px);
466
993
  </section>
467
994
  </div>
468
995
  ', :html %>
469
-
996
+
470
997
  <p><strong>Note:</strong> If you are using Sections in a Modal, or they are being loaded via AJAX, or they are hidden when Foundation is initialized, you will need to reflow the sections to get tabs to display properly:</p>
471
998
 
472
999
  <%= code_example "