zurb-foundation 3.2.5 → 4.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (239) hide show
  1. data/.gitignore +6 -2
  2. data/CHANGELOG.md +1 -26
  3. data/CONTRIBUTING.md +18 -0
  4. data/Gemfile.lock +19 -0
  5. data/Gruntfile.js +27 -0
  6. data/README.md +5 -6
  7. data/{Capfile → docs/Capfile} +0 -1
  8. data/docs/Gemfile +8 -0
  9. data/docs/Gemfile.lock +43 -0
  10. data/docs/Procfile +2 -0
  11. data/docs/README.md +1 -0
  12. data/docs/_sidebar-components.html.erb +109 -0
  13. data/docs/_sidebar.html.erb +109 -0
  14. data/docs/_zurb-jobs.html.erb +5 -0
  15. data/docs/changelog.html.erb +185 -0
  16. data/docs/compile.rb +43 -0
  17. data/docs/components/alert-boxes.html.erb +202 -0
  18. data/docs/components/block-grid.html.erb +118 -0
  19. data/docs/components/breadcrumbs.html.erb +146 -0
  20. data/docs/components/button-groups.html.erb +174 -0
  21. data/docs/components/buttons.html.erb +220 -0
  22. data/docs/components/clearing.html.erb +152 -0
  23. data/docs/components/custom-forms.html.erb +306 -0
  24. data/docs/components/dropdown-buttons.html.erb +233 -0
  25. data/docs/components/dropdown.html.erb +186 -0
  26. data/docs/components/flex-video.html.erb +93 -0
  27. data/docs/components/forms.html.erb +468 -0
  28. data/docs/components/grid.html.erb +355 -0
  29. data/docs/components/inline-lists.html.erb +89 -0
  30. data/docs/components/joyride.html.erb +178 -0
  31. data/docs/components/keystrokes.html.erb +74 -0
  32. data/docs/components/labels.html.erb +98 -0
  33. data/docs/components/magellan.html.erb +84 -0
  34. data/docs/components/orbit.html.erb +262 -0
  35. data/docs/components/pagination.html.erb +181 -0
  36. data/docs/components/panels.html.erb +121 -0
  37. data/docs/components/pricing-tables.html.erb +154 -0
  38. data/docs/components/progress-bars.html.erb +120 -0
  39. data/docs/components/reveal.html.erb +147 -0
  40. data/docs/components/section.html.erb +156 -0
  41. data/docs/components/side-nav.html.erb +122 -0
  42. data/docs/components/split-buttons.html.erb +218 -0
  43. data/docs/components/sub-nav.html.erb +120 -0
  44. data/docs/components/switch.html.erb +288 -0
  45. data/docs/components/tables.html.erb +123 -0
  46. data/docs/components/thumbnails.html.erb +87 -0
  47. data/docs/components/tooltips.html.erb +73 -0
  48. data/docs/components/top-bar.html.erb +219 -0
  49. data/docs/components/type.html.erb +359 -0
  50. data/docs/components/visibility.html.erb +102 -0
  51. data/docs/config.ru +12 -0
  52. data/docs/config/deploy.rb +33 -0
  53. data/docs/controller.rb +43 -0
  54. data/docs/css/_coderay.scss +116 -0
  55. data/docs/css/_settings.scss +1 -0
  56. data/docs/css/docs.scss +174 -0
  57. data/docs/css/normalize.scss +396 -0
  58. data/docs/css/qunit-composite.css +13 -0
  59. data/docs/css/qunit.css +235 -0
  60. data/docs/faq.html.erb +61 -0
  61. data/docs/img/demos/demo1-th.png +0 -0
  62. data/docs/img/demos/demo1.png +0 -0
  63. data/docs/img/demos/demo2-th.png +0 -0
  64. data/docs/img/demos/demo2.png +0 -0
  65. data/docs/img/demos/demo3-th.png +0 -0
  66. data/docs/img/demos/demo3.png +0 -0
  67. data/docs/img/demos/demo4-th.png +0 -0
  68. data/docs/img/demos/demo4.png +0 -0
  69. data/docs/img/demos/demo5-th.png +0 -0
  70. data/docs/img/demos/demo5.png +0 -0
  71. data/docs/index.html.erb +299 -0
  72. data/docs/javascript.html.erb +133 -0
  73. data/docs/js/docs.js +3 -0
  74. data/docs/js/qunit-composite.js +105 -0
  75. data/docs/js/qunit.js +1977 -0
  76. data/docs/js/tests/tabs/simple_tabs.html +57 -0
  77. data/docs/js/tests/tabs/simple_tabs.js +54 -0
  78. data/docs/js/tests/tooltips/tooltips.html +39 -0
  79. data/docs/js/tests/tooltips/tooltips.js +11 -0
  80. data/docs/layout.html.erb +99 -0
  81. data/docs/rails.html.erb +66 -0
  82. data/docs/sass.html.erb +299 -0
  83. data/docs/support.html.erb +134 -0
  84. data/foundation.gemspec +2 -4
  85. data/index.html +3 -23
  86. data/js/foundation/foundation.alerts.js +50 -0
  87. data/js/foundation/foundation.clearing.js +478 -0
  88. data/{vendor/assets/javascripts/foundation/jquery.cookie.js → js/foundation/foundation.cookie.js} +3 -1
  89. data/js/foundation/foundation.dropdown.js +122 -0
  90. data/js/foundation/foundation.forms.js +403 -0
  91. data/js/foundation/foundation.joyride.js +613 -0
  92. data/js/foundation/foundation.js +331 -0
  93. data/js/foundation/foundation.magellan.js +130 -0
  94. data/js/foundation/foundation.orbit.js +355 -0
  95. data/{vendor/assets/javascripts/foundation/jquery.placeholder.js → js/foundation/foundation.placeholder.js} +4 -2
  96. data/js/foundation/foundation.reveal.js +264 -0
  97. data/js/foundation/foundation.section.js +180 -0
  98. data/js/foundation/foundation.tooltips.js +195 -0
  99. data/js/foundation/foundation.topbar.js +187 -0
  100. data/js/foundation/index.js +16 -0
  101. data/{vendor/assets/javascripts/foundation/modernizr.foundation.js → js/vendor/custom.modernizr.js} +0 -0
  102. data/js/vendor/jquery.js +9597 -0
  103. data/js/vendor/zepto.js +1782 -0
  104. data/lib/foundation/engine.rb +8 -1
  105. data/lib/foundation/generators/install_generator.rb +24 -1
  106. data/lib/foundation/generators/templates/application.html.erb +20 -6
  107. data/lib/foundation/generators/templates/application.html.haml +2 -6
  108. data/lib/foundation/generators/templates/application.html.slim +2 -5
  109. data/lib/foundation/version.rb +1 -1
  110. data/lib/zurb-foundation.rb +7 -9
  111. data/package.json +9 -0
  112. data/scss/foundation.scss +42 -15
  113. data/scss/foundation/_foundation-global.scss +226 -0
  114. data/scss/foundation/components/_alert-boxes.scss +106 -0
  115. data/scss/foundation/components/_block-grid.scss +63 -0
  116. data/scss/foundation/components/_breadcrumbs.scss +117 -0
  117. data/scss/foundation/components/_button-groups.scss +59 -0
  118. data/scss/foundation/components/_buttons.scss +217 -0
  119. data/scss/foundation/components/_clearing.scss +209 -0
  120. data/scss/foundation/components/_custom-forms.scss +232 -0
  121. data/scss/foundation/components/_dropdown-buttons.scss +114 -0
  122. data/scss/foundation/components/_dropdown.scss +137 -0
  123. data/scss/foundation/components/_flex-video.scss +45 -0
  124. data/scss/foundation/components/_forms.scss +309 -0
  125. data/scss/foundation/components/_grid.scss +149 -71
  126. data/scss/foundation/components/_inline-lists.scss +47 -0
  127. data/scss/foundation/components/_joyride.scss +193 -0
  128. data/scss/foundation/components/_keystrokes.scss +56 -0
  129. data/scss/foundation/components/_labels.scss +81 -0
  130. data/scss/foundation/components/_magellan.scss +15 -0
  131. data/scss/foundation/components/_orbit.scss +193 -0
  132. data/scss/foundation/components/_pagination.scss +99 -0
  133. data/scss/foundation/components/_panels.scss +76 -0
  134. data/scss/foundation/components/_pricing-tables.scss +130 -0
  135. data/scss/foundation/components/_progress-bars.scss +68 -0
  136. data/scss/foundation/components/_reveal.scss +131 -0
  137. data/scss/foundation/components/_section.scss +194 -0
  138. data/scss/foundation/components/_side-nav.scss +68 -0
  139. data/scss/foundation/components/_split-buttons.scss +159 -0
  140. data/scss/foundation/components/_sub-nav.scss +67 -0
  141. data/scss/foundation/components/_switch.scss +242 -0
  142. data/scss/foundation/components/_tables.scss +80 -0
  143. data/scss/foundation/components/_thumbs.scss +45 -0
  144. data/scss/foundation/components/_tooltips.scss +113 -0
  145. data/scss/foundation/components/_top-bar.scss +443 -0
  146. data/scss/foundation/components/_type.scss +411 -0
  147. data/scss/foundation/components/_visibility.scss +117 -0
  148. data/scss/normalize.scss +396 -0
  149. data/templates/project/config.rb +26 -0
  150. data/templates/project/index.html +28 -43
  151. data/templates/project/manifest.rb +21 -28
  152. data/templates/project/scss/_settings.scss +4 -243
  153. data/templates/project/scss/app.scss +37 -44
  154. data/templates/project/scss/normalize.scss +396 -0
  155. data/test/stylesheets/styles.css +955 -0
  156. metadata +144 -153
  157. data/config/deploy.rb +0 -42
  158. data/lib/foundation/generators/layout_generator.rb +0 -28
  159. data/scss/foundation/_settings.scss +0 -281
  160. data/scss/foundation/common/_base.scss +0 -4
  161. data/scss/foundation/common/_forms.scss +0 -117
  162. data/scss/foundation/common/_globals.scss +0 -35
  163. data/scss/foundation/common/_ratios.scss +0 -19
  164. data/scss/foundation/common/_typography.scss +0 -104
  165. data/scss/foundation/components/modules/_all.scss +0 -10
  166. data/scss/foundation/components/modules/_buttons.scss +0 -178
  167. data/scss/foundation/components/modules/_clearing.scss +0 -61
  168. data/scss/foundation/components/modules/_joyride.scss +0 -33
  169. data/scss/foundation/components/modules/_mqueries.scss +0 -458
  170. data/scss/foundation/components/modules/_navbar.scss +0 -74
  171. data/scss/foundation/components/modules/_offcanvas.scss +0 -55
  172. data/scss/foundation/components/modules/_orbit.scss +0 -90
  173. data/scss/foundation/components/modules/_reveal.scss +0 -34
  174. data/scss/foundation/components/modules/_tabs.scss +0 -67
  175. data/scss/foundation/components/modules/_topbar.scss +0 -167
  176. data/scss/foundation/components/modules/_ui.scss +0 -292
  177. data/scss/foundation/functions/_all.scss +0 -2
  178. data/scss/foundation/functions/_convert-number-to-word.scss +0 -10
  179. data/scss/foundation/functions/_grid-calc.scss +0 -5
  180. data/scss/foundation/functions/modular-scale.scss +0 -3
  181. data/scss/foundation/mixins/_all.scss +0 -5
  182. data/scss/foundation/mixins/_clearfix.scss +0 -13
  183. data/scss/foundation/mixins/_css-triangle.scss +0 -22
  184. data/scss/foundation/mixins/_font-size.scss +0 -13
  185. data/scss/foundation/mixins/_respond-to.scss +0 -11
  186. data/scss/foundation/mixins/_semantic-grid.scss +0 -66
  187. data/test/buttons.html +0 -189
  188. data/test/clearing.html +0 -85
  189. data/test/config.rb +0 -11
  190. data/test/elements.html +0 -490
  191. data/test/forms.html +0 -371
  192. data/test/grid.html +0 -543
  193. data/test/images/orbit-demo/demo1.jpeg +0 -0
  194. data/test/images/orbit-demo/demo2.jpeg +0 -0
  195. data/test/images/orbit-demo/demo3.jpeg +0 -0
  196. data/test/images/orbit-demo/slider-background.jpeg +0 -0
  197. data/test/index.html +0 -83
  198. data/test/joyride.html +0 -127
  199. data/test/magellan.html +0 -112
  200. data/test/navigation.html +0 -269
  201. data/test/orbit.html +0 -112
  202. data/test/reveal.html +0 -91
  203. data/test/scss/_settings.scss +0 -245
  204. data/test/scss/styles.scss +0 -50
  205. data/test/tabs.html +0 -197
  206. data/test/template.html +0 -52
  207. data/test/topbar-login.html +0 -194
  208. data/test/topbar.html +0 -139
  209. data/test/type.html +0 -188
  210. data/vendor/assets/images/foundation/orbit/bullets.jpg +0 -0
  211. data/vendor/assets/images/foundation/orbit/left-arrow-small.png +0 -0
  212. data/vendor/assets/images/foundation/orbit/left-arrow.png +0 -0
  213. data/vendor/assets/images/foundation/orbit/loading.gif +0 -0
  214. data/vendor/assets/images/foundation/orbit/mask-black.png +0 -0
  215. data/vendor/assets/images/foundation/orbit/pause-black.png +0 -0
  216. data/vendor/assets/images/foundation/orbit/right-arrow-small.png +0 -0
  217. data/vendor/assets/images/foundation/orbit/right-arrow.png +0 -0
  218. data/vendor/assets/images/foundation/orbit/rotator-black.png +0 -0
  219. data/vendor/assets/images/foundation/orbit/timer-black.png +0 -0
  220. data/vendor/assets/javascripts/foundation/app.js +0 -41
  221. data/vendor/assets/javascripts/foundation/index.js +0 -19
  222. data/vendor/assets/javascripts/foundation/jquery.event.move.js +0 -580
  223. data/vendor/assets/javascripts/foundation/jquery.event.swipe.js +0 -130
  224. data/vendor/assets/javascripts/foundation/jquery.foundation.accordion.js +0 -47
  225. data/vendor/assets/javascripts/foundation/jquery.foundation.alerts.js +0 -20
  226. data/vendor/assets/javascripts/foundation/jquery.foundation.buttons.js +0 -83
  227. data/vendor/assets/javascripts/foundation/jquery.foundation.clearing.js +0 -413
  228. data/vendor/assets/javascripts/foundation/jquery.foundation.forms.js +0 -502
  229. data/vendor/assets/javascripts/foundation/jquery.foundation.joyride.js +0 -639
  230. data/vendor/assets/javascripts/foundation/jquery.foundation.magellan.js +0 -96
  231. data/vendor/assets/javascripts/foundation/jquery.foundation.mediaQueryToggle.js +0 -27
  232. data/vendor/assets/javascripts/foundation/jquery.foundation.navigation.js +0 -55
  233. data/vendor/assets/javascripts/foundation/jquery.foundation.orbit.js +0 -919
  234. data/vendor/assets/javascripts/foundation/jquery.foundation.reveal.js +0 -794
  235. data/vendor/assets/javascripts/foundation/jquery.foundation.tabs.js +0 -66
  236. data/vendor/assets/javascripts/foundation/jquery.foundation.tooltips.js +0 -211
  237. data/vendor/assets/javascripts/foundation/jquery.foundation.topbar.js +0 -174
  238. data/vendor/assets/javascripts/foundation/jquery.js +0 -9555
  239. data/vendor/assets/javascripts/foundation/jquery.offcanvas.js +0 -50
@@ -0,0 +1,146 @@
1
+ <div class="row">
2
+ <div class="large-9 push-3 columns">
3
+
4
+ <% @page_title = "Breadcrumbs" %>
5
+ <div class="row">
6
+ <div class="large-12 columns">
7
+ <h2><%= @page_title %></h2>
8
+ <h4 class="subheader">Breadcrumbs come in handy to show a navigation trail for users clicking through a site or app. They'll conform to 100% of the container width you put them in.</h4>
9
+ </div>
10
+ </div>
11
+
12
+ <div class="row">
13
+ <div class="large-12 columns">
14
+ <ul class="breadcrumbs">
15
+ <li><a href="#">Home</a></li>
16
+ <li><a href="#">Features</a></li>
17
+ <li class="unavailable"><a href="#">Gene Splicing</a></li>
18
+ <li class="current"><a href="#">Cloning</a></li>
19
+ </ul>
20
+
21
+ <hr>
22
+
23
+ <h3>Build With Predefined HTML Classes</h3>
24
+ <p>There are two ways to build breadcrumbs in Foundation 4: with our predefined HTML classes or with our structure and mixins. Building breadcrumbs using our predefined class is easy. You'll need an <code>&lt;ul class="breadcrumbs"&gt;</code> with <code>&lt;li&gt;</code> elements inside. You have access to two state classes: <code>&lt;li class="unavailable"&gt;</code> and <code>&lt;li class="current"&gt;</code> to control link intentions. The default markup looks like this:</p>
25
+
26
+ <%= code_example '
27
+ <ul class="breadcrumbs">
28
+ <li><a href="#">Home</a></li>
29
+ <li><a href="#">Features</a></li>
30
+ <li class="unavailable"><a href="#">Gene Splicing</a></li>
31
+ <li class="current"><a href="#">Cloning</a></li>
32
+ </ul>', :html %>
33
+
34
+ <p>For these styles to come across, make sure you have the <strong>default Foundation CSS package</strong> or that you've selected <strong>breadcrumbs from a custom package</strong>. These should be linked up following our default <a href="#getting-started">HTML page structure</a>.</p>
35
+
36
+ <hr>
37
+
38
+ <h3>Build with Mixins</h3>
39
+ <p>We've included SCSS mixins used to style alert boxes. To use these mixins, you'll need to have the <a href="#extention-install">extension installed</a> or grab <a href="#">_foundation-global.scss</a> and <a href="#">_alerts.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>
40
+
41
+ <%= code_example '
42
+ @import "foundation/foundation-global", "foundation/breadcrumbs";
43
+ ', :css %>
44
+
45
+ <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>
46
+
47
+ <%= code_example '
48
+ <ul class="your-class-name">
49
+ <li><a href="#">Home</a></li>
50
+ <li><a href="#">Features</a></li>
51
+ <li class="unavailable"><a href="#">Gene Splicing</a></li>
52
+ <li class="current"><a href="#">Cloning</a></li>
53
+ </ul>', :html %>
54
+
55
+ <h5>Container Mixin</h5>
56
+ <p>You can build your breadcrumbs using our global mixin by including it on your custom class or ID in your stylesheet. The container mixin will create the necessary style for the <code>&lt;ul&gt;</code>. The global mixin looks like this:</p>
57
+
58
+ <%= code_example '
59
+ .your-class-name { @include crumb-container; }
60
+ ', :css %>
61
+
62
+ <ul class="crumb-container">
63
+ <li><a href="#">Home</a></li>
64
+ <li><a href="#">Features</a></li>
65
+ <li class="unavailable"><a href="#">Gene Splicing</a></li>
66
+ <li class="current"><a href="#">Cloning</a></li>
67
+ </ul>
68
+
69
+ <h5>Crumbs Mixin</h5>
70
+ <p>Use this mixin to apply the list item and link styles to items inside the breadcrumb container. You attach this mixin to the list items inside of your container.</p>
71
+
72
+
73
+ <%= code_example '
74
+ .your-class-name {
75
+ @include crumb-container;
76
+
77
+ li { @include crumbs; }
78
+ }
79
+ ', :css %>
80
+
81
+ <ul class="crumb-container crumbs">
82
+ <li><a href="#">Home</a></li>
83
+ <li><a href="#">Features</a></li>
84
+ <li class="unavailable"><a href="#">Gene Splicing</a></li>
85
+ <li class="current"><a href="#">Cloning</a></li>
86
+ </ul>
87
+
88
+ <h5>Radius Mixin</h5>
89
+ <p>We've also created a global radius mixin that you can use to add border-radius to any element you'd like.</p>
90
+
91
+ <%= code_example '
92
+ .your-class-name {
93
+ @include crumb-container;
94
+ @include radius($radius);
95
+
96
+ li { @include crumbs; }
97
+ }
98
+ ', :css %>
99
+
100
+ <ul class="crumb-container crumbs radius">
101
+ <li><a href="#">Home</a></li>
102
+ <li><a href="#">Features</a></li>
103
+ <li class="unavailable"><a href="#">Gene Splicing</a></li>
104
+ <li class="current"><a href="#">Cloning</a></li>
105
+ </ul>
106
+
107
+ <h5>Default SCSS Variables</h5>
108
+ <%= code_example '
109
+ /* We use this to set the background color for the breadcrumb container */
110
+ $crumb-bg: lighten($secondaryColor, 5%);
111
+
112
+ /* We use these to set the padding around the breadcrumbs. */
113
+ $crumb-padding: emCalc(6px) emCalc(14px) emCalc(9px);
114
+ $crumb-side-padding: emCalc(12px);
115
+
116
+ /* We use these to control border styles. */
117
+ $crumb-function-factor: 10%;
118
+ $crumb-border-size: 1px;
119
+ $crumb-border-style: solid;
120
+ $crumb-border-color: darken($crumb-bg, $crumb-function-factor);
121
+ $crumb-radius: $button-radius;
122
+
123
+ /* We use these to set various text styles for breadcrumbs. */
124
+ $crumb-font-size: emCalc(11px);
125
+ $crumb-font-color: $primary-color;
126
+ $crumb-font-color-current: #333;
127
+ $crumb-font-color-unavailable: #999;
128
+ $crumb-font-transform: uppercase;
129
+ $crumb-link-decor: underline;
130
+
131
+ /* We use these to control the slash between breadcrumbs */
132
+ $crumb-slash-color: #aaa;
133
+ $crumb-slash: "/";
134
+ ', :css %>
135
+
136
+ <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>.</p>
137
+
138
+ </div>
139
+ </div>
140
+
141
+ </div>
142
+
143
+ <div class="large-3 pull-9 columns">
144
+ <%= render "_sidebar-components.html.erb" %>
145
+ </div>
146
+ </div>
@@ -0,0 +1,174 @@
1
+ <div class="row">
2
+ <div class="large-9 push-3 columns">
3
+
4
+ <% @page_title = "Button Groups" %>
5
+ <div class="row">
6
+ <div class="large-12 columns">
7
+ <h2><%= @page_title %></h2>
8
+ <h4 class="subheader">Button groups are great when you need to display a group of actions in a bar. These build off the button styles and work perfectly with the grid.</h4>
9
+ </div>
10
+ </div>
11
+
12
+ <div class="row">
13
+ <div class="large-12 columns">
14
+
15
+ <ul class="button-group">
16
+ <li><a href="#" class="small button">Button 1</a></li>
17
+ <li><a href="#" class="small button">Button 2</a></li>
18
+ <li><a href="#" class="small button">Button 3</a></li>
19
+ </ul>
20
+ <ul class="button-group radius">
21
+ <li><a href="#" class="button secondary">Button 1</a></li>
22
+ <li><a href="#" class="button secondary">Button 2</a></li>
23
+ <li><a href="#" class="button secondary">Button 3</a></li>
24
+ <li><a href="#" class="button secondary">Button 4</a></li>
25
+ </ul>
26
+ <ul class="button-group round even-3">
27
+ <li><a href="#" class="button alert">Button 1</a></li>
28
+ <li><a href="#" class="button alert">Button 2</a></li>
29
+ <li><a href="#" class="button alert">Button 3</a></li>
30
+ </ul>
31
+ <ul class="button-group round even-3">
32
+ <li><input type="submit" class="button success" value="Button 1"></li>
33
+ <li><input type="submit" class="button success" value="Button 2"></li>
34
+ <li><input type="submit" class="button success" value="Button 3"></li>
35
+ </ul>
36
+
37
+ <hr>
38
+
39
+ <h3>Build With Predefined HTML Classes</h3>
40
+ <p>There are two ways to build button groups in Foundation 4: with our predefined HTML classes or with our structure and mixins. Building button groups using our predefined classes is a breeze, you'll just wrap a <a href="button.html">button</a> inside an <code>&lt;ul&gt;</code>.</p>
41
+
42
+ <p>The button styles will work the same as they do when building a single button, but they'll float next to each other to create a group. You also have access to the same radius classes as buttons, only they'll go on the unordered list instead of the button. You can even make sure the buttons take up even space within the container you put them in.</p>
43
+
44
+ <ul class="disc">
45
+ <li>The radius classes: <code>.radius</code> or <code>.round</code>.</li>
46
+ <li>The even classes: <code>.even-2</code> through <code>.even-8</code> to control the even widths.</li>
47
+ </ul>
48
+
49
+ <%= code_example '
50
+ <!-- A default button-group with small buttons inside -->
51
+ <ul class="button-group">
52
+ <li><a href="#" class="small button">Button 1</a></li>
53
+ <li><a href="#" class="small button">Button 2</a></li>
54
+ <li><a href="#" class="small button">Button 3</a></li>
55
+ </ul>
56
+
57
+ <!-- A round, even-3 button-group with default alert buttons inside. -->
58
+ <!-- Do not put the radius classes on the buttons themselves. -->
59
+ <ul class="button-group round even-3">
60
+ <li><a href="#" class="button alert">Button 1</a></li>
61
+ <li><a href="#" class="button alert">Button 2</a></li>
62
+ <li><a href="#" class="button alert">Button 3</a></li>
63
+ </ul>
64
+ ', :html %>
65
+
66
+ <p>For these styles to take effect, make sure you have the <strong>default Foundation CSS package</strong> or that you've selected <strong>buttons and button-groups from a custom package</strong>. These should be linked up following our default <a href="#getting-started">HTML page structure</a>.</p>
67
+
68
+ <hr>
69
+
70
+ <h3>Build with Mixins</h3>
71
+ <p>We've included SCSS mixins used to style button groups. To use these mixins, you'll need to have the <a href="#extention-install">extension installed</a> or grab <a href="#">_foundation-global.scss</a>, <a href="#">_buttons.scss</a> and <a href="#">_button-groups.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>
72
+
73
+ <%= code_example '
74
+ @import "foundation/foundation-global", "foundation/buttons", "foundation/button-groups";
75
+ ', :css %>
76
+
77
+ <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>
78
+
79
+ <%= code_example '
80
+ <ul class="your-class-name">
81
+ <li><a href="#" class="your-button-class">Button 1</a></li>
82
+ <li><a href="#" class="your-button-class">Button 2</a></li>
83
+ <li><a href="#" class="your-button-class">Button 3</a></li>
84
+ </ul>
85
+ ', :html %>
86
+
87
+ <h5>Container Mixin</h5>
88
+ <p>Since button groups need to be within a list to work properly, you'll need to create some styles for the list container that you use.</p>
89
+
90
+ <%= code_example '
91
+ .your-class-name { @include button-group-container; }
92
+ ', :css %>
93
+
94
+ <p>You'll also need to make sure to include some styles for your buttons inside the group. Either use a class you've already styled, or apply it specifically here.</p>
95
+
96
+ <%= code_example '
97
+ .your-class-name { @include button-group-container;
98
+ .your-button-class { @include button; }
99
+ }
100
+ ', :css %>
101
+
102
+ <ul class="button-group-docs">
103
+ <li><a href="#" class="button-class">Button 1</a></li>
104
+ <li><a href="#" class="button-class">Button 2</a></li>
105
+ <li><a href="#" class="button-class">Button 3</a></li>
106
+ </ul>
107
+
108
+ <h5>Style Mixin</h5>
109
+ <p>With this mixin, you'll be able to make the rest of the button-group, including: radius, even with styles and floats. You'll apply this mixin to the <code>&lt;li&gt;</code> elements of the button group list.</p>
110
+
111
+ <%= code_example '
112
+ .your-class-name { @include button-group-container;
113
+ .your-button-class { @include button; }
114
+
115
+ & > li { @include button-group-style($radius, $even, $float); }
116
+ }
117
+
118
+ /* This controls the radius of the left and right edges. */
119
+ /* Set to true or px value */
120
+ $radius: false
121
+
122
+ /* This makes the buttons take up even space in their container */
123
+ /* Set to the number of buttons in the group */
124
+ $even: false
125
+
126
+ /* Controls how the buttons in the group floatm set to left or right */
127
+ $float: left
128
+ ', :css %>
129
+
130
+ <ul class="button-group-docs list">
131
+ <li><a href="#" class="button-class">Button 1</a></li>
132
+ <li><a href="#" class="button-class">Button 2</a></li>
133
+ <li><a href="#" class="button-class">Button 3</a></li>
134
+ </ul>
135
+
136
+ <h5>Inset Shadow, Border Radius &amp; Transition Mixin</h5>
137
+ <p>Sometimes you want to add a nice fancy shine to the edge of your buttons. And sometimes you want to make that shine look like it gets depressed upon tap or click. We've got you covered with our quick inset shadow mixin. You can use our radius mixin to quickly apply rounded corners or a transition mixin to give the buttons a fade effect.</p>
138
+
139
+ <%= code_example '
140
+ .your-class-name { @include button-group-container;
141
+ .your-button-class {
142
+ @include button;
143
+ @include inset-shadow;
144
+ @include single-transition;
145
+ }
146
+
147
+ & > li { @include button-group-style(true); }
148
+ }
149
+ ', :css %>
150
+
151
+ <ul class="button-group-docs list extras">
152
+ <li><a href="#" class="button-class">Button 1</a></li>
153
+ <li><a href="#" class="button-class">Button 2</a></li>
154
+ <li><a href="#" class="button-class">Button 3</a></li>
155
+ </ul>
156
+
157
+ <h5>Default SCSS Variables</h5>
158
+ <%= code_example '
159
+ /* We use this to set the margin below button groups. */
160
+ $button-group-bottom-margin: emCalc(20px);
161
+ ', :css %>
162
+
163
+ <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>.</p>
164
+
165
+ </div>
166
+ </div>
167
+
168
+ </div>
169
+
170
+ <div class="large-3 pull-9 columns">
171
+ <%= render "_sidebar-components.html.erb" %>
172
+ </div>
173
+ </div>
174
+
@@ -0,0 +1,220 @@
1
+ <div class="row">
2
+ <div class="large-9 push-3 columns">
3
+
4
+ <% @page_title = "Buttons" %>
5
+ <div class="row">
6
+ <div class="large-12 columns">
7
+ <h2><%= @page_title %></h2>
8
+ <h4 class="subheader">Buttons are a convenient tool when it comes to more traditional actions. To that end, Foundation has a lot of easy to use button styles that you can customize or override to fit your needs.</h4>
9
+ </div>
10
+ </div>
11
+
12
+ <div class="row">
13
+ <div class="large-12 columns">
14
+
15
+ <div class="row">
16
+ <div class="small-6 large-6 columns">
17
+ <a href="#" class="tiny button">.tiny.button</a><br>
18
+ <a href="#" class="small button">.small.button</a><br>
19
+ <a href="#" class="button">.button</a><br>
20
+ </div>
21
+ <div class="small-6 large-6 columns">
22
+ <a href="#" class="tiny button secondary">.tiny.secondary</a><br>
23
+ <a href="#" class="small button success radius">.small.success.radius</a><br>
24
+ <a href="#" class="button alert round disabled">.round.disabled</a><br>
25
+ </div>
26
+ </div>
27
+ <a href="#" class="large button expand">.large.button.expand</a>
28
+
29
+ <hr>
30
+
31
+ <h3>Build With Predefined HTML Classes</h3>
32
+ <p>There are two ways to build buttons in Foundation 4: with our predefined HTML classes or with our structure and mixins. Building buttons using our predefined classes is simple, you'll need an <code>&lt;a&gt;</code>, <code>&lt;button&gt;</code> or <code>&lt;input&gt;</code> with a class of <code>.button</code>. This will create a default medium button. You can also use size, color and radius classes to control more of the style.</p>
33
+
34
+ <p>The class options:</p>
35
+ <ul class="disc">
36
+ <li>The size classes include: <code>.tiny, .small, .medium</code> or <code>.large</code></li>
37
+ <li>The color classes include: <code>.secondary, .alert</code> or <code>.success</code></li>
38
+ <li>The radius classes include: <code>.radius</code> or <code>.round</code></li>
39
+ <li>You can also add <code>.disabled</code> to any button and it will look and act disabled</li>
40
+ </ul>
41
+
42
+ <%= code_example '
43
+ <!-- Size Classes -->
44
+ <a href="#" class="button">Default Button</a>
45
+ <a href="#" class="tiny button">Tiny Button</a>
46
+ <a href="#" class="small button">Small Button</a>
47
+ <a href="#" class="large button">Large Button</a>
48
+
49
+ <!-- Color Classes -->
50
+ <a href="#" class="button secondary">Secondary Button</a>
51
+ <a href="#" class="button success">Success Button</a>
52
+ <a href="#" class="button alert">Alert Button</a>
53
+
54
+ <!-- Radius Classes -->
55
+ <a href="#" class="button radius">Radius Button</a>
56
+ <a href="#" class="button round">Round Button</a>
57
+
58
+ <!-- Disabled Class -->
59
+ <a href="#" class="button disabled">Disabled Button</a>
60
+ ', :html %>
61
+
62
+ <p>You may chain one class from each group to build up desired default styles. For these styles to take effect, make sure you have the <strong>default Foundation CSS package</strong> or that you've selected <strong>button from a custom package</strong>. These should be linked up following our default <a href="#getting-started">HTML page structure</a>.</p>
63
+
64
+ <hr>
65
+
66
+ <h3>Build with Mixins</h3>
67
+ <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="#">_foundation-global.scss</a> and <a href="#">_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>
68
+
69
+ <%= code_example '
70
+ @import "foundation/foundation-global", "foundation/buttons";
71
+ ', :css %>
72
+
73
+ <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>
74
+
75
+ <%= code_example '
76
+ <a href="#" class="your-class-name">Button Text</a>
77
+ ', :html %>
78
+
79
+ <h5>Quick Mixin</h5>
80
+ <p>You can quickly build an entire button using our global mixin by including it on your custom class or ID in your stylesheet. The global mixin will create the necessary style for the button. The global mixin looks like this:</p>
81
+
82
+ <%= code_example '
83
+ /* Using the default styles */
84
+ .your-class-name { @include button; }
85
+ ', :css %>
86
+
87
+ <a href="#" class="button">Default Button</a>
88
+
89
+ <p>There are also <strong>six options</strong> you can customize on the fly when writing this mixin. These controls things like: background color, border color, text color, size and state. Setting any of these options to <strong>false</strong> will negate those styles.</p>
90
+
91
+ <%= code_example '
92
+ /* Using the available options */
93
+ .your-class-name {
94
+ @include button($padding, $bg, $radius, $full-width, $disabled, $is-input);
95
+ }
96
+
97
+ /* This controls padding around the buttons. Use a variable or em value */
98
+ $padding: $button-med
99
+
100
+ /* This controls button color. Set to one of our variables or a custom hex value */
101
+ $bg: $primary-color
102
+
103
+ /* This controls button radius. Set to a variable, true/false, or custom px value */
104
+ $radius: false
105
+
106
+ /* This whether button is full-width. Set to true or false */
107
+ $full-width: false
108
+
109
+ /* This controls whether disabled styles are used. Set to true or false */
110
+ $disabled: false
111
+
112
+ /* This controls padding for inputs, they are a little different */
113
+ $is-input: false
114
+ ', :css %>
115
+
116
+ <a href="#" class="custom buttony">Custom Button</a>
117
+
118
+ <h5>Base Mixin</h5>
119
+ <p>You also have access to a few internal mixins that can create parts of the button as needed. The base mixin will create a button base that only include structural styles.</p>
120
+
121
+ <%= code_example '
122
+ .your-class-name { @include button-base; }
123
+ ', :css %>
124
+
125
+ <a href="#" class="button-base">Button Base</a>
126
+
127
+ <h5>Size Mixin</h5>
128
+ <p>The size mixin will let you control the padding, which adjusts text size. You can also choose whether the button is full-width or an input button.</p>
129
+
130
+ <%= code_example '
131
+ .your-class-name {
132
+ @include button-base;
133
+ @include button-size($padding, $full-width, $is-input);
134
+ }
135
+ ', :css %>
136
+
137
+ <a href="#" class="button-base size">Button Base &amp; Size</a>
138
+
139
+ <h5>Style Mixin</h5>
140
+ <p>The last internal mixin you have access to for buttons is the style mixin. This will help you style background color, text, border and radius.</p>
141
+
142
+ <%= code_example '
143
+ .your-class-name {
144
+ @include button-base;
145
+ @include button-size;
146
+ @include button-style($bg, $radius, $disabled);
147
+ }
148
+ ', :css %>
149
+
150
+ <a href="#" class="button-base size style">Button Base, Size &amp; Style</a>
151
+
152
+ <h5>Inset Shadow, Border Radius &amp; Transition Mixin</h5>
153
+ <p>Sometimes you want to add a nice fancy shine to the edge of your button. And sometimes you want to make that shine look like it gets depressed upon tap or click. We've got you covered with our quick inset shadow mixin. You can use our radius mixin to quickly apply rounded corners or a transition mixin to give the button a nice zero-fade.</p>
154
+
155
+ <%= code_example '
156
+ .your-class-name {
157
+ @include button-base;
158
+ @include button-size;
159
+ @include button-style;
160
+ @include radius;
161
+ @include single-transition;
162
+ @include inset-shadow($active);
163
+ }
164
+
165
+ /* This controls whether or not you get the depressed look on tap/click. */
166
+ /* Set to true or false, defaults to true. */
167
+ $active: true
168
+ ', :css %>
169
+
170
+ <a href="#" class="button-base size style radius shine">Button Base, Size, Style &amp; Shine</a>
171
+
172
+ <h5>Default SCSS Variables</h5>
173
+ <%= code_example '
174
+ /* We use these to build padding for buttons. */
175
+ $button-med: emCalc(12px);
176
+ $button-tny: emCalc(7px);
177
+ $button-sml: emCalc(9px);
178
+ $button-lrg: emCalc(16px);
179
+
180
+ /* We use this to control the display property. */
181
+ $button-display: inline-block;
182
+ $button-margin-bottom: emCalc(20px);
183
+
184
+ /* We use these to control button text styles. */
185
+ $button-font-color: #fff;
186
+ $button-font-color-alt: #333;
187
+ $button-font-med: emCalc(16px);
188
+ $button-font-tny: emCalc(11px);
189
+ $button-font-sml: emCalc(13px);
190
+ $button-font-lrg: emCalc(20px);
191
+ $button-font-weight: bold;
192
+ $button-font-align: center;
193
+
194
+ /* We use these to control various hover effects. */
195
+ $button-function-factor: 10%;
196
+
197
+ /* We use these to control button border styles. */
198
+ $button-border-width: 1px;
199
+ $button-border-style: solid;
200
+ $button-border-color: darken($primary-color, $button-function-factor);
201
+
202
+ /* We use this to set the default radius used throughout the core. */
203
+ $button-radius: $global-radius;
204
+
205
+ /* We use this to set default opacity for disabled buttons. */
206
+ $button-disabled-opacity: 0.6;
207
+ ', :css %>
208
+
209
+ <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
+
211
+ </div>
212
+ </div>
213
+
214
+ </div>
215
+
216
+ <div class="large-3 pull-9 columns">
217
+ <%= render "_sidebar-components.html.erb" %>
218
+ </div>
219
+
220
+ </div>