zurb-foundation 4.1.6 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. data/CONTRIBUTING.md +5 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +7 -0
  4. data/docs/CHANGELOG.md +27 -0
  5. data/docs/Gemfile +2 -0
  6. data/docs/Gemfile.lock +10 -0
  7. data/docs/_sidebar-components.html.erb +1 -0
  8. data/docs/_sidebar.html.erb +1 -0
  9. data/docs/components/alert-boxes.html.erb +8 -3
  10. data/docs/components/block-grid.html.erb +3 -3
  11. data/docs/components/breadcrumbs.html.erb +2 -2
  12. data/docs/components/button-groups.html.erb +2 -2
  13. data/docs/components/buttons.html.erb +3 -3
  14. data/docs/components/clearing.html.erb +7 -6
  15. data/docs/components/custom-forms.html.erb +1 -0
  16. data/docs/components/dropdown-buttons.html.erb +3 -3
  17. data/docs/components/dropdown.html.erb +20 -4
  18. data/docs/components/flex-video.html.erb +3 -3
  19. data/docs/components/forms.html.erb +5 -5
  20. data/docs/components/global.html.erb +235 -3
  21. data/docs/components/grid.html.erb +2 -2
  22. data/docs/components/inline-lists.html.erb +3 -3
  23. data/docs/components/interchange.html.erb +127 -0
  24. data/docs/components/keystrokes.html.erb +3 -3
  25. data/docs/components/kitchen-sink.html.erb +2 -2
  26. data/docs/components/labels.html.erb +3 -3
  27. data/docs/components/orbit.html.erb +120 -8
  28. data/docs/components/pagination.html.erb +5 -5
  29. data/docs/components/panels.html.erb +3 -3
  30. data/docs/components/pricing-tables.html.erb +3 -3
  31. data/docs/components/progress-bars.html.erb +3 -3
  32. data/docs/components/reveal.html.erb +126 -7
  33. data/docs/components/section.html.erb +43 -1
  34. data/docs/components/side-nav.html.erb +3 -3
  35. data/docs/components/split-buttons.html.erb +3 -3
  36. data/docs/components/sub-nav.html.erb +4 -4
  37. data/docs/components/switch.html.erb +3 -3
  38. data/docs/components/tables.html.erb +1 -1
  39. data/docs/components/thumbnails.html.erb +2 -2
  40. data/docs/components/tooltips.html.erb +34 -1
  41. data/docs/components/top-bar.html.erb +109 -30
  42. data/docs/components/type.html.erb +2 -1
  43. data/docs/components/visibility.html.erb +8 -8
  44. data/docs/css/normalize.scss +2 -2
  45. data/docs/css/qunit.css +1 -1
  46. data/docs/img/demos/demo1.jpg +0 -0
  47. data/docs/img/demos/demo2.jpg +0 -0
  48. data/docs/img/demos/demo3.jpg +0 -0
  49. data/docs/img/demos/demo4.jpg +0 -0
  50. data/docs/img/demos/demo5.jpg +0 -0
  51. data/docs/img/demos/interchange/default.jpg +0 -0
  52. data/docs/img/demos/interchange/large.jpg +0 -0
  53. data/docs/img/demos/interchange/med.jpg +0 -0
  54. data/docs/img/demos/interchange/small.jpg +0 -0
  55. data/docs/img/demos/interchange/smallest.jpg +0 -0
  56. data/docs/index.html.erb +14 -5
  57. data/docs/javascript.html.erb +2 -4
  58. data/docs/layout.html.erb +1 -1
  59. data/docs/rails.html.erb +4 -1
  60. data/docs/sass.html.erb +1274 -1023
  61. data/js/foundation/foundation.alerts.js +3 -1
  62. data/js/foundation/foundation.clearing.js +1 -1
  63. data/js/foundation/foundation.dropdown.js +25 -6
  64. data/js/foundation/foundation.forms.js +14 -12
  65. data/js/foundation/foundation.interchange.js +265 -0
  66. data/js/foundation/foundation.joyride.js +16 -3
  67. data/js/foundation/foundation.js +53 -7
  68. data/js/foundation/foundation.magellan.js +5 -3
  69. data/js/foundation/foundation.orbit.js +19 -2
  70. data/js/foundation/foundation.reveal.js +64 -11
  71. data/js/foundation/foundation.section.js +26 -17
  72. data/js/foundation/foundation.tooltips.js +16 -8
  73. data/js/foundation/foundation.topbar.js +98 -46
  74. data/js/foundation/index.js +1 -0
  75. data/lib/foundation/generators/install_generator.rb +2 -2
  76. data/lib/foundation/version.rb +1 -1
  77. data/scss/foundation/_variables.scss +134 -71
  78. data/scss/foundation/components/_alert-boxes.scss +20 -20
  79. data/scss/foundation/components/_block-grid.scss +7 -4
  80. data/scss/foundation/components/_breadcrumbs.scss +3 -3
  81. data/scss/foundation/components/_buttons.scss +5 -3
  82. data/scss/foundation/components/_clearing.scss +12 -6
  83. data/scss/foundation/components/_custom-forms.scss +17 -10
  84. data/scss/foundation/components/_dropdown.scss +6 -6
  85. data/scss/foundation/components/_forms.scss +5 -3
  86. data/scss/foundation/components/_global.scss +63 -30
  87. data/scss/foundation/components/_grid.scss +10 -9
  88. data/scss/foundation/components/_joyride.scss +22 -20
  89. data/scss/foundation/components/_keystrokes.scss +1 -1
  90. data/scss/foundation/components/_orbit.scss +108 -30
  91. data/scss/foundation/components/_reveal.scss +12 -8
  92. data/scss/foundation/components/_section.scss +38 -3
  93. data/scss/foundation/components/_switch.scss +18 -12
  94. data/scss/foundation/components/_thumbs.scss +10 -3
  95. data/scss/foundation/components/_tooltips.scss +11 -11
  96. data/scss/foundation/components/_top-bar.scss +102 -64
  97. data/scss/foundation/components/_type.scss +54 -47
  98. data/templates/project/manifest.rb +1 -0
  99. metadata +11 -4
@@ -52,10 +52,10 @@
52
52
  <hr>
53
53
 
54
54
  <h3>Build with a Mixin</h3>
55
- <p>We've included SCSS mixins used to style panels so that you can code smarter. To use the mixin, 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/_foundation-global.scss">_foundation-global.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/_panels.scss">_panels.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>
55
+ <p>We've included SCSS mixins used to style panels so that you can code smarter. To use the mixin, 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/_panels.scss">_panels.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>
56
56
 
57
57
  <%= code_example '
58
- @import "foundation/foundation-global", "foundation/components/global", "foundation/components/panels";
58
+ @import "foundation/variables", "foundation/components/global", "foundation/components/panels";
59
59
  ', :css %>
60
60
 
61
61
  <p>If you are using the mixins, you may include the styles on whatever class or ID you'd like to the <code>&lt;div&gt;</code>.</p>
@@ -111,7 +111,7 @@ $panel-padding: emCalc(20px);
111
111
  $panel-font-color: #333;
112
112
  $panel-font-color-alt: #fff;', :css %>
113
113
 
114
- <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>
114
+ <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>
115
115
 
116
116
 
117
117
  </div>
@@ -58,10 +58,10 @@
58
58
  <hr>
59
59
 
60
60
  <h3>Build with a Mixin</h3>
61
- <p>We've included SCSS mixins used to style pricing tables so that you can code how you want to. To use the mixin, 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/_foundation-global.scss">_foundation-global.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/_pricing-tables.scss">_pricing-tables.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>
61
+ <p>We've included SCSS mixins used to style pricing tables so that you can code how you want to. To use the mixin, 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/_pricing-tables.scss">_pricing-tables.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>
62
62
 
63
63
  <%= code_example '
64
- @import "foundation/foundation-global", "foundation/components/global", "foundation/components/pricing-tables";
64
+ @import "foundation/variables", "foundation/components/global", "foundation/components/pricing-tables";
65
65
  ', :css %>
66
66
 
67
67
  <p>If you are using the mixins, you may include the styles on whatever class or ID you'd like with the <code>&lt;ul&gt;</code> and the list items inside it.</p>
@@ -145,7 +145,7 @@ $price-cta-bg: #f5f5f5;
145
145
  $price-cta-align: center;
146
146
  $price-cta-padding: emCalc(20px) emCalc(20px) 0;', :css %>
147
147
 
148
- <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>
148
+ <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>
149
149
 
150
150
  </div>
151
151
  </div>
@@ -46,10 +46,10 @@
46
46
  <hr>
47
47
 
48
48
  <h3>Build with our Mixins</h3>
49
- <p>We've included SCSS mixins used to style progress bars. To use the mixin, 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/_foundation-global.scss">_foundation-global.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/_progress-bars.scss">_progress-bars.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>
49
+ <p>We've included SCSS mixins used to style progress bars. To use the mixin, 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/_progress-bars.scss">_progress-bars.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>
50
50
 
51
51
  <%= code_example '
52
- @import "foundation/foundation-global", "foundation/components/global", "foundation/components/progress-bars";
52
+ @import "foundation/variables", "foundation/components/global", "foundation/components/progress-bars";
53
53
  ', :css %>
54
54
 
55
55
  <h5>Container Mixin</h5>
@@ -112,7 +112,7 @@ $progress-meter-secondary-color: $secondary-color;
112
112
  $progress-meter-success-color: $success-color;
113
113
  $progress-meter-alert-color: $alert-color;', :css %>
114
114
 
115
- <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>
115
+ <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>
116
116
 
117
117
  </div>
118
118
  </div>
@@ -33,11 +33,11 @@
33
33
 
34
34
  <p>The class options:</p>
35
35
  <ul class="disc">
36
- <li><code>tiny</code>: Set the width to 30%.</li>
37
- <li><code>small</code>: Set the width to 40%.</li>
38
- <li><code>medium</code>: Set the width to 60%.</li>
39
- <li><code>large</code>: Set the width to 70%.</li>
40
- <li><code>xlarge</code>: Set the width to 95%.</li>
36
+ <li><code>small</code>: Set the width to 30%.</li>
37
+ <li><code>medium</code>: Set the width to 40%.</li>
38
+ <li><code>large</code>: Set the width to 60%.</li>
39
+ <li><code>xlarge</code>: Set the width to 70%.</li>
40
+ <li><code>expand</code>: Set the width to 95%.</li>
41
41
  </ul>
42
42
 
43
43
  <p>For these styles to come across, make sure you have the default Foundation CSS package or that you've selected reveal from a custom package. These should be linked up following our default <a href="#">HTML page structure</a>.</p>
@@ -60,8 +60,124 @@ $('#myModal').foundation('reveal', 'open');
60
60
  $('#myModal').foundation('reveal', 'close');
61
61
  ", :js %>
62
62
 
63
+ <h5>Firing a Reveal Modal with Ajax Content</h5>
64
+ <p>To launch a modal with content from another page, just add a <code>data-reveal-ajax</code> attribute pointing to the url of that page. When clicked, the Reveal modal will be opened with a content from that page. Beware, that content of the object from <code>data-reveal-id</code> attribute will be overwritten as a result.</p>
65
+ <p>To use an url from <code>href</code> attribute just add <code>data-reveal-ajax="true"</code> instead.</p>
66
+
67
+ <%= code_example '
68
+ <button data-reveal-id="myModal" data-reveal-ajax="http://some-url">
69
+ Click Me For A Modal
70
+ </button>
71
+
72
+ <a href="http://some-url" data-reveal-id="myModal" data-reveal-ajax="true">
73
+ Click Me For A Modal
74
+ </a>
75
+ ', :html %>
76
+
77
+ <p>Ajax-based Reveal modals can also be opened via JavaScript:</p>
78
+
79
+ <%= code_example "
80
+ // just an url
81
+ $('#myModal').foundation('reveal', 'open', 'http://some-url');
82
+
83
+ // url with extra parameters
84
+ $('#myModal').foundation('reveal', 'open', {
85
+ url: 'http://some-url',
86
+ data: {param1: 'value1', param2: 'value2'}
87
+ });
88
+
89
+ // url with custom callbacks
90
+ $('#myModal').foundation('reveal', 'open', {
91
+ url: 'http://some-url',
92
+ success: function(data) {
93
+ alert('modal data loaded');
94
+ },
95
+ error: function() {
96
+ alert('failed loading modal');
97
+ }
98
+ });
99
+ ", :js %>
100
+
101
+ <p>Please refer to <a href="http://api.jquery.com/jQuery.ajax/" target="_blank">http://api.jquery.com/jQuery.ajax/</a> for a complete list of possible parameters.</p>
102
+
63
103
  <hr>
64
104
 
105
+ <h3>Build with Mixins</h3>
106
+ <p>We've included SCSS mixins used to style reveal. 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/_breadcrumbs.scss">_reveal.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>
107
+
108
+ <%= code_example '
109
+ @import "foundation/variables", "foundation/components/global", "foundation/components/reveal";
110
+ ', :css %>
111
+
112
+ <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>
113
+
114
+ <%= code_example '
115
+ <div id="myModalID" class="your-class">
116
+ <h2>This is a modal.</h2>
117
+ <p>Some text...</p>
118
+ <a class="your-close-class">&times;</a>
119
+ </div>', :html %>
120
+
121
+ <h5>Background Mixin</h5>
122
+ <p>The first mixin you'll need to setup when using Reveal through SCSS is the background cover. This is what fades out the rest of the page to help show the modal. The container mixin looks like this:</p>
123
+
124
+ <%= code_example '
125
+ .reveal-modal-bg { @include reveal-bg; }', :css %>
126
+
127
+ <h5>Base Mixin</h5>
128
+ <p>This mixin is used to set the basic styles for positioning, visibility and a few other necessities. This mixin also gives you the ability to set the width of the modal. The mixin looks like this:</p>
129
+
130
+ <%= code_example '
131
+ .your-modal-class { @include reveal-modal-base($base-style, $width); }
132
+
133
+ /* Control whether or not base styles are included, defaults to "true" */
134
+ $base-style: true;
135
+
136
+ /* Control the width of each modal, defaults to 80% */
137
+ $width: $reveal-default-width;
138
+ ', :css %>
139
+
140
+ <h5>Style Mixin</h5>
141
+ <p>This mixin gives you access to changing the background color, borders, shadows, and offsets. You can create lots of different modals with this mixin. Here's what the mixin looks like:</p>
142
+
143
+ <%= code_example '
144
+ .your-modal-class { @include reveal-modal-style($bg, $padding, $border, $border-style, $border-width, $border-color, $box-shadow, $top-offset); }
145
+
146
+ /* Set this to a color to change the background of the modal */
147
+ $bg: $reveal-modal-bg;
148
+
149
+ /* Padding around content inside the modals */
150
+ $padding: $reveal-modal-padding;
151
+
152
+ /* Control whether or not you want a border */
153
+ $border: true;
154
+
155
+ /* If you set border to "true", this controls border style */
156
+ $border-style: $reveal-border-style;
157
+
158
+ /* If you set border to "true", this controls border width */
159
+ $border-width: $reveal-border-width;
160
+
161
+ /* If you set border to "true", this controls border color */
162
+ $border-color: $reveal-border-color;
163
+
164
+ /* Control whether or not you want box-shadows */
165
+ $box-shadow: true;
166
+
167
+ /* Set how far from the top you want your modal to sit */
168
+ $top-offset: $reveal-position-top;
169
+ ', :css %>
170
+
171
+ <h5>The Close Button Mixin</h5>
172
+ <p>One important aspect we musn't forget is the close button. We've given you a mixin that will help style the button, it looks like this:</p>
173
+
174
+ <%= code_example '
175
+ .your-modal-close-class { @include reveal-close($color); }
176
+
177
+ /* Change the color of the close button */
178
+ $color: $reveal-close-color;
179
+ ', :css %>
180
+
65
181
  <h5>Default SCSS Variables</h5>
66
182
 
67
183
  <%= code_example '
@@ -86,9 +202,12 @@ $reveal-close-weight: bold;
86
202
  /* We use these to control the modal border */
87
203
  $reveal-border-style: solid;
88
204
  $reveal-border-width: 1px;
89
- $reveal-border-color: #666;', :css %>
205
+ $reveal-border-color: #666;
206
+
207
+ $reveal-modal-class: "reveal-modal";
208
+ $close-reveal-modal-class: "close-reveal-modal";', :css %>
90
209
 
91
- <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>
210
+ <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>
92
211
 
93
212
  <hr>
94
213
 
@@ -74,7 +74,46 @@
74
74
  <section>
75
75
  <p class="title" data-section-title><a href="#panel2">Section 2</a></p>
76
76
  <div class="content" data-slug="panel2" data-section-content>
77
- <p>Section 2. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
77
+ <div class="section-container auto" data-section data-options="deep_linking: true; one_up: false">
78
+ <section>
79
+ <p class="title" data-section-title><a href="#panel2nested1">Section 1</a></p>
80
+ <div class="content" data-slug="nested1" data-section-content>
81
+ <p>Section 1. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
82
+ </div>
83
+ </section>
84
+ <section>
85
+ <p class="title" data-section-title><a href="#panel2nested2">Section 2</a></p>
86
+ <div class="content" data-slug="nested2" data-section-content>
87
+ <p>Section 2. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
88
+ </div>
89
+ </section>
90
+ <div data-section-region class="section">
91
+ <p class="title" data-section-title><a href="#panel2nested3">Section 3</a></p>
92
+ <div class="content" data-slug="nested3" data-section-content>
93
+ <form>
94
+ <div class="row collapse">
95
+ <div class="large-2 columns">
96
+ <label class="inline">Your Name</label>
97
+ </div>
98
+ <div class="large-10 columns">
99
+ <input type="text" id="yourName" placeholder="Jane Smith">
100
+ </div>
101
+ </div>
102
+ <div class="row collapse">
103
+ <div class="large-2 columns">
104
+ <label class="inline"> Your Email</label>
105
+ </div>
106
+ <div class="large-10 columns">
107
+ <input type="text" id="yourEmail" placeholder="jane@smithco.com">
108
+ </div>
109
+ </div>
110
+ <label>What's up?</label>
111
+ <textarea rows="4"></textarea>
112
+ <button type="submit" class="radius button">Submit</button>
113
+ </form>
114
+ </div>
115
+ </div>
116
+ </div>
78
117
  </div>
79
118
  </section>
80
119
  <div data-section-region class="section">
@@ -950,6 +989,9 @@ $section-content-bg: #fff;
950
989
  $section-vertical-nav-min-width: emCalc(200px);
951
990
  $section-vertical-tabs-title-width: emCalc(200px);
952
991
  $section-bottom-margin: emCalc(20px);
992
+
993
+ $title-selector: ".title";
994
+ $content-selector: ".content";
953
995
  ', :css %>
954
996
 
955
997
  <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>.</p>
@@ -53,10 +53,10 @@
53
53
  <hr>
54
54
 
55
55
  <h3>Build with our Mixins</h3>
56
- <p>We've included SCSS mixins used to style side nav. To use the mixin, 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/_foundation-global.scss">_foundation-global.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/_side-nav.scss">_side-nav.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>
56
+ <p>We've included SCSS mixins used to style side nav. To use the mixin, 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/_side-nav.scss">_side-nav.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/foundation-global", "foundation/components/global", "foundation/components/side-nav";
59
+ @import "foundation/variables", "foundation/components/global", "foundation/components/side-nav";
60
60
  ', :css %>
61
61
 
62
62
  <h5>Quick Mixin</h5>
@@ -113,7 +113,7 @@ $side-nav-divider-size: 1px;
113
113
  $side-nav-divider-style: solid;
114
114
  $side-nav-divider-color: darken(#fff, 10%);', :css %>
115
115
 
116
- <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>
116
+ <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>
117
117
 
118
118
  </div>
119
119
  </div>
@@ -53,10 +53,10 @@
53
53
  <hr>
54
54
 
55
55
  <h3>Build with Mixins</h3>
56
- <p>We've included SCSS mixins used to style buttons. To use these mixins, you'll need to have the <a href="#extention-install">extension installed</a> or grab <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/_foundation-global.scss">_foundation-global.scss</a>, <a href="#https://github.com/zurb/foundation/blob/master/scss/foundation/components/_buttons.scss">_buttons.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/_split-buttons.scss">_split-buttons.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>
56
+ <p>We've included SCSS mixins used to style buttons. To use these mixins, you'll need to have the <a href="#extention-install">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/_buttons.scss">_buttons.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/_split-buttons.scss">_split-buttons.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/foundation-global", "foundation/components/global", "foundation/components/buttons", "foundation/components/split-buttons";
59
+ @import "foundation/variables", "foundation/components/global", "foundation/components/buttons", "foundation/components/split-buttons";
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>
@@ -138,7 +138,7 @@ $split-button-pip-top-lrg: $button-lrg + emCalc(5px);
138
138
  $split-button-pip-left-lrg: emCalc(-9px);
139
139
  ', :css %>
140
140
 
141
- <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>
141
+ <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>
142
142
 
143
143
  <hr>
144
144
 
@@ -47,10 +47,10 @@
47
47
  <hr>
48
48
 
49
49
  <h3>Build with our Mixins</h3>
50
- <p>We've included SCSS mixins used to style sub-nav. To use the mixin, 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/_foundation-global.scss">_foundation-global.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/_sub-nav.scss">_sub-nav.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>
50
+ <p>We've included SCSS mixins used to style sub-nav. To use the mixin, 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/_sub-nav.scss">_sub-nav.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>
51
51
 
52
52
  <%= code_example '
53
- @import "foundation/foundation-global", "foundation/components/global", "foundation/components/sub-nav";
53
+ @import "foundation/variables", "foundation/components/global", "foundation/components/sub-nav";
54
54
  ', :css %>
55
55
 
56
56
  <h5>Quick Mixin</h5>
@@ -109,9 +109,9 @@ $sub-nav-active-font-weight: bold;
109
109
  $sub-nav-active-bg: $primary-color;
110
110
  $sub-nav-active-color: #fff;
111
111
  $sub-nav-active-padding: emCalc(3px) emCalc(9px);
112
- $sub-nav-active-cursor: default;', :css %>
112
+ $sub-nav-active-cursor: $cursor-default-value;', :css %>
113
113
 
114
- <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>
114
+ <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>
115
115
 
116
116
  </div>
117
117
  </div>
@@ -97,10 +97,10 @@
97
97
  <hr>
98
98
 
99
99
  <h3>Build with our Mixins</h3>
100
- <p>We've included SCSS mixins used to style switches. To use the mixin, 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/_foundation-global.scss">_foundation-global.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/_switch.scss">_switch.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>
100
+ <p>We've included SCSS mixins used to style switches. To use the mixin, 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/_switch.scss">_switch.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>
101
101
 
102
102
  <%= code_example '
103
- @import "foundation/foundation-global", "foundation/components/global", "foundation/components/switch";
103
+ @import "foundation/variables", "foundation/components/global", "foundation/components/switch";
104
104
  ', :css %>
105
105
 
106
106
  <p>The markup is pretty simple, you'll only need a single class or ID on the container to apply the mixin.</p>
@@ -278,7 +278,7 @@ $switch-negative-color: #f5f5f5;
278
278
  /* Outline Style for tabbing through switches */
279
279
  $switch-label-outline: 1px dotted #888;', :css %>
280
280
 
281
- <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>
281
+ <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>
282
282
 
283
283
  </div>
284
284
  </div>
@@ -113,7 +113,7 @@ $table-line-height: emCalc(18px);
113
113
  $table-display: table-cell;
114
114
  $table-margin-bottom: emCalc(20px);', :css %>
115
115
 
116
- <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>
116
+ <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>
117
117
 
118
118
 
119
119
  </div>
@@ -31,10 +31,10 @@
31
31
  <hr>
32
32
 
33
33
  <h3>Build with our Mixins</h3>
34
- <p>We've included SCSS mixins used to style labels. To use the mixin, 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/_foundation-global.scss">_foundation-global.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/_thumbs.scss">_thumbs.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>
34
+ <p>We've included SCSS mixins used to style labels. To use the mixin, 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/_thumbs.scss">_thumbs.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>
35
35
 
36
36
  <%= code_example '
37
- @import "foundation/foundation-global", "foundation/components/global", "foundation/components/labels";
37
+ @import "foundation/variables", "foundation/components/global", "foundation/components/labels";
38
38
  ', :css %>
39
39
 
40
40
  <h5>Quick Mixin</h5>
@@ -35,6 +35,38 @@
35
35
  <li><code>tip-right</code>: Align the tip to the right the element you attach it to.</li>
36
36
  </ul>
37
37
 
38
+ <h4>Disable for Touch Devices</h4>
39
+ <p>If you don't want tooltips to interfere with a touch event, you can disable them for those devices. To do this, you'll just need to add a data-option to your tooltip, like so:</p>
40
+
41
+ <%= code_example '
42
+ <span data-tooltip data-options="disable-for-touch:true" class="has-tip" title="Tooltips are awesome, you should totally use them!">extended information</span>
43
+ ', :html %>
44
+
45
+ <hr>
46
+
47
+ <h4>Available SCSS Variables</h4>
48
+ <%= code_example '
49
+ $has-tip-border-bottom: dotted 1px #ccc;
50
+ $has-tip-font-weight: bold;
51
+ $has-tip-font-color: #333;
52
+ $has-tip-border-bottom-hover: dotted 1px darken($primary-color, 20%);
53
+ $has-tip-font-color-hover: $primary-color;
54
+ $has-tip-cursor-type: help;
55
+
56
+ $tooltip-padding: emCalc(8px);
57
+ $tooltip-bg: #000;
58
+ $tooltip-font-size: emCalc(15px);
59
+ $tooltip-font-weight: bold;
60
+ $tooltip-font-color: #fff;
61
+ $tooltip-line-height: 1.3;
62
+ $tooltip-close-font-size: emCalc(10px);
63
+ $tooltip-close-font-weight: normal;
64
+ $tooltip-close-font-color: #888;
65
+ $tooltip-font-size-sml: emCalc(14px);
66
+ $tooltip-radius: $global-radius;
67
+ $tooltip-pip-size: 5px;
68
+ ', :css %>
69
+
38
70
  <hr>
39
71
 
40
72
  <h3>Using the Javascript</h3>
@@ -52,13 +84,14 @@
52
84
 
53
85
  <h5>Optional JavaScript Configuration</h5>
54
86
 
55
- <p>Tooltip options can only be passed in during initialization at this time.</p>
87
+ <p>Tooltips now support <code>data-options</code> configuration. You can use this functionality to disable tooltips selectively by defining <code>data-options="disable-for-touch: true"</code> on your tip target.</p>
56
88
 
57
89
  <%= code_example "
58
90
  {
59
91
  selector : '.has-tip',
60
92
  additionalInheritableClasses : [],
61
93
  tooltipClass : '.tooltip',
94
+ disable-for-touch: false,
62
95
  tipTemplate : function (selector, content) {
63
96
  return '<span data-selector=\"' + selector + '\" class=\"'
64
97
  + Foundation.libs.tooltips.settings.tooltipClass.substring(1)