va_common 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.travis.yml +4 -0
  4. data/CODE_OF_CONDUCT.md +13 -0
  5. data/Gemfile +4 -0
  6. data/README.md +66 -0
  7. data/Rakefile +1 -0
  8. data/app/assets/fonts/merriweather-bold-webfont.eot +0 -0
  9. data/app/assets/fonts/merriweather-bold-webfont.svg +294 -0
  10. data/app/assets/fonts/merriweather-bold-webfont.ttf +0 -0
  11. data/app/assets/fonts/merriweather-bold-webfont.woff +0 -0
  12. data/app/assets/fonts/merriweather-bold-webfont.woff2 +0 -0
  13. data/app/assets/fonts/merriweather-italic-webfont.eot +0 -0
  14. data/app/assets/fonts/merriweather-italic-webfont.svg +283 -0
  15. data/app/assets/fonts/merriweather-italic-webfont.ttf +0 -0
  16. data/app/assets/fonts/merriweather-italic-webfont.woff +0 -0
  17. data/app/assets/fonts/merriweather-italic-webfont.woff2 +0 -0
  18. data/app/assets/fonts/merriweather-light-webfont.eot +0 -0
  19. data/app/assets/fonts/merriweather-light-webfont.svg +299 -0
  20. data/app/assets/fonts/merriweather-light-webfont.ttf +0 -0
  21. data/app/assets/fonts/merriweather-light-webfont.woff +0 -0
  22. data/app/assets/fonts/merriweather-light-webfont.woff2 +0 -0
  23. data/app/assets/fonts/merriweather-regular-webfont.eot +0 -0
  24. data/app/assets/fonts/merriweather-regular-webfont.svg +294 -0
  25. data/app/assets/fonts/merriweather-regular-webfont.ttf +0 -0
  26. data/app/assets/fonts/merriweather-regular-webfont.woff +0 -0
  27. data/app/assets/fonts/merriweather-regular-webfont.woff2 +0 -0
  28. data/app/assets/fonts/sourcesanspro-bold-webfont.eot +0 -0
  29. data/app/assets/fonts/sourcesanspro-bold-webfont.svg +965 -0
  30. data/app/assets/fonts/sourcesanspro-bold-webfont.ttf +0 -0
  31. data/app/assets/fonts/sourcesanspro-bold-webfont.woff +0 -0
  32. data/app/assets/fonts/sourcesanspro-bold-webfont.woff2 +0 -0
  33. data/app/assets/fonts/sourcesanspro-italic-webfont.eot +0 -0
  34. data/app/assets/fonts/sourcesanspro-italic-webfont.svg +853 -0
  35. data/app/assets/fonts/sourcesanspro-italic-webfont.ttf +0 -0
  36. data/app/assets/fonts/sourcesanspro-italic-webfont.woff +0 -0
  37. data/app/assets/fonts/sourcesanspro-italic-webfont.woff2 +0 -0
  38. data/app/assets/fonts/sourcesanspro-light-webfont.eot +0 -0
  39. data/app/assets/fonts/sourcesanspro-light-webfont.svg +915 -0
  40. data/app/assets/fonts/sourcesanspro-light-webfont.ttf +0 -0
  41. data/app/assets/fonts/sourcesanspro-light-webfont.woff +0 -0
  42. data/app/assets/fonts/sourcesanspro-light-webfont.woff2 +0 -0
  43. data/app/assets/fonts/sourcesanspro-regular-webfont.eot +0 -0
  44. data/app/assets/fonts/sourcesanspro-regular-webfont.svg +989 -0
  45. data/app/assets/fonts/sourcesanspro-regular-webfont.ttf +0 -0
  46. data/app/assets/fonts/sourcesanspro-regular-webfont.woff +0 -0
  47. data/app/assets/fonts/sourcesanspro-regular-webfont.woff2 +0 -0
  48. data/app/assets/images/design/background/thread.png +0 -0
  49. data/app/assets/images/design/logo/logo-alt-hover.png +0 -0
  50. data/app/assets/images/design/logo/logo-alt.png +0 -0
  51. data/app/assets/images/design/logo/logo-hover.png +0 -0
  52. data/app/assets/images/design/logo/logo-small.png +0 -0
  53. data/app/assets/images/design/logo/logo.png +0 -0
  54. data/app/assets/images/design/logo/og-image.jpg +0 -0
  55. data/app/assets/images/design/seal/seal-footer.png +0 -0
  56. data/app/assets/images/design/seal/seal-footer.svg +1 -0
  57. data/app/assets/images/design/seal/seal.png +0 -0
  58. data/app/assets/images/design/seal/stars.png +0 -0
  59. data/app/assets/images/icons/apple-touch-icon-114x114.png +0 -0
  60. data/app/assets/images/icons/apple-touch-icon-152x152.png +0 -0
  61. data/app/assets/images/icons/apple-touch-icon-72x72.png +0 -0
  62. data/app/assets/images/icons/apple-touch-icon.png +0 -0
  63. data/app/assets/images/icons/favicon.ico +0 -0
  64. data/app/assets/images/icons/va.png +0 -0
  65. data/app/assets/images/icons/watermark.png +0 -0
  66. data/app/assets/images/icons/wrench.png +0 -0
  67. data/app/assets/images/social-icons/png/facebook25.png +0 -0
  68. data/app/assets/images/social-icons/png/rss25.png +0 -0
  69. data/app/assets/images/social-icons/png/twitter16.png +0 -0
  70. data/app/assets/images/social-icons/png/youtube15.png +0 -0
  71. data/app/assets/images/social-icons/svg/facebook25.svg +11 -0
  72. data/app/assets/images/social-icons/svg/rss25.svg +1 -0
  73. data/app/assets/images/social-icons/svg/twitter16.svg +15 -0
  74. data/app/assets/images/social-icons/svg/youtube15.svg +1 -0
  75. data/app/assets/js/components.js +376 -0
  76. data/app/assets/js/foundation/foundation.abide.js +408 -0
  77. data/app/assets/js/foundation/foundation.accordion.js +88 -0
  78. data/app/assets/js/foundation/foundation.alert.js +43 -0
  79. data/app/assets/js/foundation/foundation.clearing.js +586 -0
  80. data/app/assets/js/foundation/foundation.dropdown.js +463 -0
  81. data/app/assets/js/foundation/foundation.equalizer.js +104 -0
  82. data/app/assets/js/foundation/foundation.interchange.js +359 -0
  83. data/app/assets/js/foundation/foundation.joyride.js +932 -0
  84. data/app/assets/js/foundation/foundation.js +725 -0
  85. data/app/assets/js/foundation/foundation.magellan.js +215 -0
  86. data/app/assets/js/foundation/foundation.offcanvas.js +152 -0
  87. data/app/assets/js/foundation/foundation.orbit.js +476 -0
  88. data/app/assets/js/foundation/foundation.reveal.js +498 -0
  89. data/app/assets/js/foundation/foundation.slider.js +281 -0
  90. data/app/assets/js/foundation/foundation.tab.js +249 -0
  91. data/app/assets/js/foundation/foundation.tooltip.js +339 -0
  92. data/app/assets/js/foundation/foundation.topbar.js +458 -0
  93. data/app/assets/js/foundation.min.js +6376 -0
  94. data/app/assets/js/scripts-no-touch.js +33 -0
  95. data/app/assets/js/scripts-touch.js +33 -0
  96. data/app/assets/js/va_common_main.js +1 -0
  97. data/app/assets/js/vendor/classie.js +80 -0
  98. data/app/assets/js/vendor/html5shiv.js +8 -0
  99. data/app/assets/js/vendor/jquery-1.11.0.min.js +4 -0
  100. data/app/assets/js/vendor/jquery.js +9789 -0
  101. data/app/assets/js/vendor/jquery.smooth-scroll.js +255 -0
  102. data/app/assets/js/vendor/jquery.stellar.js +651 -0
  103. data/app/assets/js/vendor/jquery.tipsy.js +258 -0
  104. data/app/assets/js/vendor/menu.js +40 -0
  105. data/app/assets/js/vendor/modernizr.custom.js +4 -0
  106. data/app/assets/js/vendor/nwmatcher-1.2.5-min.js +7 -0
  107. data/app/assets/js/vendor/respond.min.js +6 -0
  108. data/app/assets/js/vendor/scroll-settings.js +3 -0
  109. data/app/assets/js/vendor/selectivizr-1.0.3b.js +560 -0
  110. data/app/assets/js/vendor/stellar-settings.js +8 -0
  111. data/app/assets/js/vendor/svg-injector.js +450 -0
  112. data/app/assets/js/vendor/tota11y.min.js +28 -0
  113. data/app/assets/js/vendor/wow.min.js +2 -0
  114. data/app/assets/stylesheets/_va.scss +2377 -0
  115. data/app/assets/stylesheets/components/_accordions.scss +98 -0
  116. data/app/assets/stylesheets/core/_base.scss +20 -0
  117. data/app/assets/stylesheets/core/_defaults.scss +92 -0
  118. data/app/assets/stylesheets/core/_grid-settings.scss +10 -0
  119. data/app/assets/stylesheets/core/_grid.scss +116 -0
  120. data/app/assets/stylesheets/core/_utilities.scss +105 -0
  121. data/app/assets/stylesheets/core/_variables.scss +88 -0
  122. data/app/assets/stylesheets/elements/_buttons.scss +189 -0
  123. data/app/assets/stylesheets/elements/_figure.scss +9 -0
  124. data/app/assets/stylesheets/elements/_inputs.scss +328 -0
  125. data/app/assets/stylesheets/elements/_labels.scss +39 -0
  126. data/app/assets/stylesheets/elements/_list.scss +82 -0
  127. data/app/assets/stylesheets/elements/_table.scss +39 -0
  128. data/app/assets/stylesheets/elements/_typography.scss +220 -0
  129. data/app/assets/stylesheets/foundation/_functions.scss +146 -0
  130. data/app/assets/stylesheets/foundation/_settings.scss +1467 -0
  131. data/app/assets/stylesheets/foundation/_variables.scss +1286 -0
  132. data/app/assets/stylesheets/foundation/components/_accordion.scss +157 -0
  133. data/app/assets/stylesheets/foundation/components/_alert-boxes.scss +128 -0
  134. data/app/assets/stylesheets/foundation/components/_block-grid.scss +132 -0
  135. data/app/assets/stylesheets/foundation/components/_breadcrumbs.scss +132 -0
  136. data/app/assets/stylesheets/foundation/components/_button-groups.scss +200 -0
  137. data/app/assets/stylesheets/foundation/components/_buttons.scss +259 -0
  138. data/app/assets/stylesheets/foundation/components/_clearing.scss +256 -0
  139. data/app/assets/stylesheets/foundation/components/_dropdown-buttons.scss +131 -0
  140. data/app/assets/stylesheets/foundation/components/_dropdown.scss +262 -0
  141. data/app/assets/stylesheets/foundation/components/_flex-video.scss +51 -0
  142. data/app/assets/stylesheets/foundation/components/_forms.scss +570 -0
  143. data/app/assets/stylesheets/foundation/components/_global.scss +481 -0
  144. data/app/assets/stylesheets/foundation/components/_grid.scss +289 -0
  145. data/app/assets/stylesheets/foundation/components/_icon-bar.scss +358 -0
  146. data/app/assets/stylesheets/foundation/components/_inline-lists.scss +57 -0
  147. data/app/assets/stylesheets/foundation/components/_joyride.scss +222 -0
  148. data/app/assets/stylesheets/foundation/components/_keystrokes.scss +61 -0
  149. data/app/assets/stylesheets/foundation/components/_labels.scss +106 -0
  150. data/app/assets/stylesheets/foundation/components/_magellan.scss +34 -0
  151. data/app/assets/stylesheets/foundation/components/_offcanvas.scss +515 -0
  152. data/app/assets/stylesheets/foundation/components/_orbit.scss +368 -0
  153. data/app/assets/stylesheets/foundation/components/_pagination.scss +162 -0
  154. data/app/assets/stylesheets/foundation/components/_panels.scss +101 -0
  155. data/app/assets/stylesheets/foundation/components/_pricing-tables.scss +150 -0
  156. data/app/assets/stylesheets/foundation/components/_progress-bars.scss +79 -0
  157. data/app/assets/stylesheets/foundation/components/_range-slider.scss +169 -0
  158. data/app/assets/stylesheets/foundation/components/_reveal.scss +202 -0
  159. data/app/assets/stylesheets/foundation/components/_side-nav.scss +116 -0
  160. data/app/assets/stylesheets/foundation/components/_split-buttons.scss +199 -0
  161. data/app/assets/stylesheets/foundation/components/_sub-nav.scss +123 -0
  162. data/app/assets/stylesheets/foundation/components/_switches.scss +238 -0
  163. data/app/assets/stylesheets/foundation/components/_tables.scss +135 -0
  164. data/app/assets/stylesheets/foundation/components/_tabs.scss +123 -0
  165. data/app/assets/stylesheets/foundation/components/_thumbs.scss +66 -0
  166. data/app/assets/stylesheets/foundation/components/_toolbar.scss +70 -0
  167. data/app/assets/stylesheets/foundation/components/_tooltips.scss +142 -0
  168. data/app/assets/stylesheets/foundation/components/_top-bar.scss +691 -0
  169. data/app/assets/stylesheets/foundation/components/_type.scss +525 -0
  170. data/app/assets/stylesheets/foundation/components/_visibility.scss +408 -0
  171. data/app/assets/stylesheets/functions/_new-breakpoint.scss +49 -0
  172. data/app/assets/stylesheets/functions/_private.scss +114 -0
  173. data/app/assets/stylesheets/lib/_normalize.scss +427 -0
  174. data/app/assets/stylesheets/lib/bourbon/_bourbon-deprecated-upcoming.scss +411 -0
  175. data/app/assets/stylesheets/lib/bourbon/_bourbon.scss +87 -0
  176. data/app/assets/stylesheets/lib/bourbon/addons/_border-color.scss +26 -0
  177. data/app/assets/stylesheets/lib/bourbon/addons/_border-radius.scss +48 -0
  178. data/app/assets/stylesheets/lib/bourbon/addons/_border-style.scss +25 -0
  179. data/app/assets/stylesheets/lib/bourbon/addons/_border-width.scss +25 -0
  180. data/app/assets/stylesheets/lib/bourbon/addons/_buttons.scss +64 -0
  181. data/app/assets/stylesheets/lib/bourbon/addons/_clearfix.scss +25 -0
  182. data/app/assets/stylesheets/lib/bourbon/addons/_ellipsis.scss +30 -0
  183. data/app/assets/stylesheets/lib/bourbon/addons/_font-stacks.scss +31 -0
  184. data/app/assets/stylesheets/lib/bourbon/addons/_hide-text.scss +27 -0
  185. data/app/assets/stylesheets/lib/bourbon/addons/_margin.scss +26 -0
  186. data/app/assets/stylesheets/lib/bourbon/addons/_padding.scss +26 -0
  187. data/app/assets/stylesheets/lib/bourbon/addons/_position.scss +48 -0
  188. data/app/assets/stylesheets/lib/bourbon/addons/_prefixer.scss +66 -0
  189. data/app/assets/stylesheets/lib/bourbon/addons/_retina-image.scss +25 -0
  190. data/app/assets/stylesheets/lib/bourbon/addons/_size.scss +51 -0
  191. data/app/assets/stylesheets/lib/bourbon/addons/_text-inputs.scss +112 -0
  192. data/app/assets/stylesheets/lib/bourbon/addons/_timing-functions.scss +34 -0
  193. data/app/assets/stylesheets/lib/bourbon/addons/_triangle.scss +63 -0
  194. data/app/assets/stylesheets/lib/bourbon/addons/_word-wrap.scss +29 -0
  195. data/app/assets/stylesheets/lib/bourbon/css3/_animation.scss +43 -0
  196. data/app/assets/stylesheets/lib/bourbon/css3/_appearance.scss +3 -0
  197. data/app/assets/stylesheets/lib/bourbon/css3/_backface-visibility.scss +3 -0
  198. data/app/assets/stylesheets/lib/bourbon/css3/_background-image.scss +42 -0
  199. data/app/assets/stylesheets/lib/bourbon/css3/_background.scss +55 -0
  200. data/app/assets/stylesheets/lib/bourbon/css3/_border-image.scss +59 -0
  201. data/app/assets/stylesheets/lib/bourbon/css3/_calc.scss +4 -0
  202. data/app/assets/stylesheets/lib/bourbon/css3/_columns.scss +47 -0
  203. data/app/assets/stylesheets/lib/bourbon/css3/_filter.scss +4 -0
  204. data/app/assets/stylesheets/lib/bourbon/css3/_flex-box.scss +287 -0
  205. data/app/assets/stylesheets/lib/bourbon/css3/_font-face.scss +24 -0
  206. data/app/assets/stylesheets/lib/bourbon/css3/_font-feature-settings.scss +4 -0
  207. data/app/assets/stylesheets/lib/bourbon/css3/_hidpi-media-query.scss +10 -0
  208. data/app/assets/stylesheets/lib/bourbon/css3/_hyphens.scss +4 -0
  209. data/app/assets/stylesheets/lib/bourbon/css3/_image-rendering.scss +14 -0
  210. data/app/assets/stylesheets/lib/bourbon/css3/_keyframes.scss +36 -0
  211. data/app/assets/stylesheets/lib/bourbon/css3/_linear-gradient.scss +38 -0
  212. data/app/assets/stylesheets/lib/bourbon/css3/_perspective.scss +8 -0
  213. data/app/assets/stylesheets/lib/bourbon/css3/_placeholder.scss +8 -0
  214. data/app/assets/stylesheets/lib/bourbon/css3/_radial-gradient.scss +39 -0
  215. data/app/assets/stylesheets/lib/bourbon/css3/_selection.scss +42 -0
  216. data/app/assets/stylesheets/lib/bourbon/css3/_text-decoration.scss +19 -0
  217. data/app/assets/stylesheets/lib/bourbon/css3/_transform.scss +15 -0
  218. data/app/assets/stylesheets/lib/bourbon/css3/_transition.scss +71 -0
  219. data/app/assets/stylesheets/lib/bourbon/css3/_user-select.scss +3 -0
  220. data/app/assets/stylesheets/lib/bourbon/functions/_assign-inputs.scss +11 -0
  221. data/app/assets/stylesheets/lib/bourbon/functions/_contains-falsy.scss +20 -0
  222. data/app/assets/stylesheets/lib/bourbon/functions/_contains.scss +26 -0
  223. data/app/assets/stylesheets/lib/bourbon/functions/_is-length.scss +11 -0
  224. data/app/assets/stylesheets/lib/bourbon/functions/_is-light.scss +21 -0
  225. data/app/assets/stylesheets/lib/bourbon/functions/_is-number.scss +11 -0
  226. data/app/assets/stylesheets/lib/bourbon/functions/_is-size.scss +13 -0
  227. data/app/assets/stylesheets/lib/bourbon/functions/_modular-scale.scss +69 -0
  228. data/app/assets/stylesheets/lib/bourbon/functions/_px-to-em.scss +13 -0
  229. data/app/assets/stylesheets/lib/bourbon/functions/_px-to-rem.scss +15 -0
  230. data/app/assets/stylesheets/lib/bourbon/functions/_shade.scss +24 -0
  231. data/app/assets/stylesheets/lib/bourbon/functions/_strip-units.scss +17 -0
  232. data/app/assets/stylesheets/lib/bourbon/functions/_tint.scss +24 -0
  233. data/app/assets/stylesheets/lib/bourbon/functions/_transition-property-name.scss +22 -0
  234. data/app/assets/stylesheets/lib/bourbon/functions/_unpack.scss +27 -0
  235. data/app/assets/stylesheets/lib/bourbon/helpers/_convert-units.scss +21 -0
  236. data/app/assets/stylesheets/lib/bourbon/helpers/_directional-values.scss +96 -0
  237. data/app/assets/stylesheets/lib/bourbon/helpers/_font-source-declaration.scss +43 -0
  238. data/app/assets/stylesheets/lib/bourbon/helpers/_gradient-positions-parser.scss +13 -0
  239. data/app/assets/stylesheets/lib/bourbon/helpers/_linear-angle-parser.scss +25 -0
  240. data/app/assets/stylesheets/lib/bourbon/helpers/_linear-gradient-parser.scss +41 -0
  241. data/app/assets/stylesheets/lib/bourbon/helpers/_linear-positions-parser.scss +61 -0
  242. data/app/assets/stylesheets/lib/bourbon/helpers/_linear-side-corner-parser.scss +31 -0
  243. data/app/assets/stylesheets/lib/bourbon/helpers/_radial-arg-parser.scss +69 -0
  244. data/app/assets/stylesheets/lib/bourbon/helpers/_radial-gradient-parser.scss +50 -0
  245. data/app/assets/stylesheets/lib/bourbon/helpers/_radial-positions-parser.scss +18 -0
  246. data/app/assets/stylesheets/lib/bourbon/helpers/_render-gradients.scss +26 -0
  247. data/app/assets/stylesheets/lib/bourbon/helpers/_shape-size-stripper.scss +10 -0
  248. data/app/assets/stylesheets/lib/bourbon/helpers/_str-to-num.scss +50 -0
  249. data/app/assets/stylesheets/lib/bourbon/settings/_asset-pipeline.scss +7 -0
  250. data/app/assets/stylesheets/lib/bourbon/settings/_prefixer.scss +9 -0
  251. data/app/assets/stylesheets/lib/bourbon/settings/_px-to-em.scss +1 -0
  252. data/app/assets/stylesheets/lib/neat/_neat-helpers.scss +8 -0
  253. data/app/assets/stylesheets/lib/neat/_neat.scss +23 -0
  254. data/app/assets/stylesheets/lib/neat/functions/_new-breakpoint.scss +49 -0
  255. data/app/assets/stylesheets/lib/neat/functions/_private.scss +114 -0
  256. data/app/assets/stylesheets/lib/neat/grid/_box-sizing.scss +15 -0
  257. data/app/assets/stylesheets/lib/neat/grid/_direction-context.scss +33 -0
  258. data/app/assets/stylesheets/lib/neat/grid/_display-context.scss +28 -0
  259. data/app/assets/stylesheets/lib/neat/grid/_fill-parent.scss +22 -0
  260. data/app/assets/stylesheets/lib/neat/grid/_media.scss +92 -0
  261. data/app/assets/stylesheets/lib/neat/grid/_omega.scss +87 -0
  262. data/app/assets/stylesheets/lib/neat/grid/_outer-container.scss +38 -0
  263. data/app/assets/stylesheets/lib/neat/grid/_pad.scss +25 -0
  264. data/app/assets/stylesheets/lib/neat/grid/_private.scss +35 -0
  265. data/app/assets/stylesheets/lib/neat/grid/_row.scss +52 -0
  266. data/app/assets/stylesheets/lib/neat/grid/_shift.scss +50 -0
  267. data/app/assets/stylesheets/lib/neat/grid/_span-columns.scss +94 -0
  268. data/app/assets/stylesheets/lib/neat/grid/_to-deprecate.scss +97 -0
  269. data/app/assets/stylesheets/lib/neat/grid/_visual-grid.scss +42 -0
  270. data/app/assets/stylesheets/lib/neat/settings/_disable-warnings.scss +13 -0
  271. data/app/assets/stylesheets/lib/neat/settings/_grid.scss +51 -0
  272. data/app/assets/stylesheets/lib/neat/settings/_visual-grid.scss +27 -0
  273. data/app/assets/stylesheets/va_common_main.css.scss +18 -0
  274. data/bin/console +14 -0
  275. data/bin/setup +7 -0
  276. data/lib/generators/files/_footer.html.erb +89 -0
  277. data/lib/generators/files/_header.html.erb +7 -0
  278. data/lib/generators/va_common_generator.rb +6 -0
  279. data/lib/generators/va_footer_generator.rb +7 -0
  280. data/lib/generators/va_header_generator.rb +7 -0
  281. data/lib/va_common/engine.rb +4 -0
  282. data/lib/va_common/version.rb +3 -0
  283. data/lib/va_common.rb +2 -0
  284. data/va_common.gemspec +22 -0
  285. metadata +354 -0
@@ -0,0 +1,570 @@
1
+ // Foundation by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ @import "global";
6
+ @import "buttons";
7
+
8
+ //
9
+ // @variables
10
+ //
11
+ $include-html-form-classes: $include-html-classes !default;
12
+
13
+ // We use this to set the base for lots of form spacing and positioning styles
14
+ $form-spacing: rem-calc(16) !default;
15
+
16
+ // We use these to style the labels in different ways
17
+ $form-label-pointer: pointer !default;
18
+ $form-label-font-size: rem-calc(14) !default;
19
+ $form-label-font-weight: $font-weight-normal !default;
20
+ $form-label-line-height: 1.5 !default;
21
+ $form-label-font-color: scale-color($black, $lightness: 30%) !default;
22
+ $form-label-small-transform: capitalize !default;
23
+ $form-label-bottom-margin: 0 !default;
24
+ $input-font-family: inherit !default;
25
+ $input-font-color: rgba(0,0,0,0.75) !default;
26
+ $input-font-size: rem-calc(14) !default;
27
+ $input-bg-color: $white !default;
28
+ $input-focus-bg-color: scale-color($white, $lightness: -2%) !default;
29
+ $input-border-color: scale-color($white, $lightness: -20%) !default;
30
+ $input-focus-border-color: scale-color($white, $lightness: -40%) !default;
31
+ $input-border-style: solid !default;
32
+ $input-border-width: 1px !default;
33
+ $input-border-radius: $global-radius !default;
34
+ $input-disabled-bg: $gainsboro !default;
35
+ $input-disabled-cursor: $cursor-default-value !default;
36
+ $input-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1) !default;
37
+ $input-include-glowing-effect: false !default;
38
+
39
+ // We use these to style the fieldset border and spacing.
40
+ $fieldset-border-style: solid !default;
41
+ $fieldset-border-width: 1px !default;
42
+ $fieldset-border-color: $gainsboro !default;
43
+ $fieldset-padding: rem-calc(20) !default;
44
+ $fieldset-margin: rem-calc(18 0) !default;
45
+
46
+ // We use these to style the legends when you use them
47
+ $legend-bg: $white !default;
48
+ $legend-font-weight: $font-weight-bold !default;
49
+ $legend-padding: rem-calc(0 3) !default;
50
+
51
+ // We use these to style the prefix and postfix input elements
52
+ $input-prefix-bg: scale-color($white, $lightness: -5%) !default;
53
+ $input-prefix-border-color: scale-color($white, $lightness: -20%) !default;
54
+ $input-prefix-border-size: 1px !default;
55
+ $input-prefix-border-type: solid !default;
56
+ $input-prefix-overflow: hidden !default;
57
+ $input-prefix-font-color: $oil !default;
58
+ $input-prefix-font-color-alt: $white !default;
59
+
60
+ // We use this setting to turn on/off HTML5 number spinners (the up/down arrows)
61
+ $input-number-spinners: true !default;
62
+
63
+ // We use these to style the error states for inputs and labels
64
+ $input-error-message-padding: rem-calc(6 9 9) !default;
65
+ $input-error-message-top: -1px !default;
66
+ $input-error-message-font-size: rem-calc(12) !default;
67
+ $input-error-message-font-weight: $font-weight-normal !default;
68
+ $input-error-message-font-style: italic !default;
69
+ $input-error-message-font-color: $white !default;
70
+ $input-error-message-bg-color: $alert-color !default;
71
+ $input-error-message-font-color-alt: $oil !default;
72
+
73
+ // We use this to style the glowing effect of inputs when focused
74
+ $glowing-effect-fade-time: 0.45s !default;
75
+ $glowing-effect-color: $input-focus-border-color !default;
76
+
77
+ // Select variables
78
+ $select-bg-color: $ghost !default;
79
+ $select-hover-bg-color: scale-color($select-bg-color, $lightness: -3%) !default;
80
+
81
+ //
82
+ // @MIXINS
83
+ //
84
+
85
+ // We use this mixin to give us form styles for rows inside of forms
86
+ @mixin form-row-base {
87
+ .row { margin: 0 ((-$form-spacing) / 2);
88
+
89
+ .column,
90
+ .columns { padding: 0 ($form-spacing / 2); }
91
+
92
+ // Use this to collapse the margins of a form row
93
+ &.collapse { margin: 0;
94
+
95
+ .column,
96
+ .columns { padding: 0; }
97
+ input {
98
+ @include side-radius($opposite-direction, 0);
99
+ }
100
+
101
+ }
102
+ }
103
+ input.column,
104
+ input.columns,
105
+ textarea.column,
106
+ textarea.columns { padding-#{$default-float}: ($form-spacing / 2); }
107
+ }
108
+
109
+ // @MIXIN
110
+ //
111
+ // We use this mixin to give all basic form elements their style
112
+ @mixin form-element {
113
+ background-color: $input-bg-color;
114
+ font-family: $input-font-family;
115
+ border: {
116
+ style: $input-border-style;
117
+ width: $input-border-width;
118
+ color: $input-border-color;
119
+ }
120
+ box-shadow: $input-box-shadow;
121
+ color: $input-font-color;
122
+ display: block;
123
+ font-size: $input-font-size;
124
+ margin: 0 0 $form-spacing 0;
125
+ padding: $form-spacing / 2;
126
+ height: ($input-font-size + ($form-spacing * 1.5) - rem-calc(1));
127
+ width: 100%;
128
+ @include box-sizing(border-box);
129
+ @if $input-include-glowing-effect {
130
+ @include block-glowing-effect(focus, $glowing-effect-fade-time, $glowing-effect-color);
131
+ }
132
+ // Basic focus styles
133
+ &:focus {
134
+ background: $input-focus-bg-color;
135
+ border-color: $input-focus-border-color;
136
+ outline: none;
137
+ }
138
+ // Disbaled Styles
139
+ &:disabled {
140
+ background-color: $input-disabled-bg;
141
+ cursor: $input-disabled-cursor;
142
+ }
143
+
144
+ // Disabled background input background color
145
+ &[disabled],
146
+ &[readonly],
147
+ fieldset[disabled] & {
148
+ background-color: $input-disabled-bg;
149
+ cursor: $input-disabled-cursor;
150
+ }
151
+ }
152
+
153
+ // @MIXIN
154
+ //
155
+ // We use this mixin to create form labels
156
+ //
157
+ // $alignment - Alignment options. Default: false. Options: [right, inline, false]
158
+ // $base-style - Control whether or not the base styles come through. Default: true.
159
+ @mixin form-label($alignment:false, $base-style:true) {
160
+
161
+ // Control whether or not the base styles come through.
162
+ @if $base-style {
163
+ font-size: $form-label-font-size;
164
+ color: $form-label-font-color;
165
+ cursor: $form-label-pointer;
166
+ display: block;
167
+ font-weight: $form-label-font-weight;
168
+ line-height: $form-label-line-height;
169
+ margin-bottom: $form-label-bottom-margin;
170
+ }
171
+
172
+ // Alignment options
173
+ @if $alignment == right {
174
+ float: none !important;
175
+ text-align: right;
176
+ }
177
+ @else if $alignment == inline {
178
+ margin: 0 0 $form-spacing 0;
179
+ padding: $form-spacing / 2 + rem-calc($input-border-width) 0;
180
+ }
181
+ }
182
+
183
+ // We use this mixin to create postfix/prefix form Labels
184
+ @mixin prefix-postfix-base {
185
+ display: block;
186
+ position: relative;
187
+ z-index: 2;
188
+ text-align: center;
189
+ width: 100%;
190
+ padding-top: 0;
191
+ padding-bottom: 0;
192
+ border-style: $input-prefix-border-type;
193
+ border-width: $input-prefix-border-size;
194
+ overflow: $input-prefix-overflow;
195
+ font-size: $form-label-font-size;
196
+ height: ($input-font-size + ($form-spacing * 1.5) - rem-calc(1));
197
+ line-height: ($input-font-size + ($form-spacing * 1.5) - rem-calc(1));
198
+ }
199
+
200
+ // @MIXIN
201
+ //
202
+ // We use this mixin to create prefix label styles
203
+ // $bg - Default:$input-prefix-bg || scale-color($white, $lightness: -5%) !default;
204
+ // $is-button - Toggle position settings if prefix is a button. Default:false
205
+ //
206
+ @mixin prefix($bg:$input-prefix-bg, $border:$input-prefix-border-color, $is-button:false) {
207
+
208
+ @if $bg {
209
+ $bg-lightness: lightness($bg);
210
+ background: $bg;
211
+ border-#{$opposite-direction}: none;
212
+
213
+ // Control the font color based on background brightness
214
+ @if $bg-lightness > 70% or $bg == yellow { color: $input-prefix-font-color; }
215
+ @else { color: $input-prefix-font-color-alt; }
216
+ }
217
+
218
+ @if $border {
219
+ border-color: $border;
220
+ }
221
+
222
+ @if $is-button {
223
+ padding-#{$default-float}: 0;
224
+ padding-#{$opposite-direction}: 0;
225
+ padding-top: 0;
226
+ padding-bottom: 0;
227
+ text-align: center;
228
+ border: none;
229
+ }
230
+
231
+ }
232
+
233
+ // @MIXIN
234
+ //
235
+ // We use this mixin to create postfix label styles
236
+ // $bg - Default:$input-prefix-bg || scale-color($white, $lightness: -5%) !default;
237
+ // $is-button - Toggle position settings if prefix is a button. Default: false
238
+ @mixin postfix($bg:$input-prefix-bg, $border:$input-prefix-border-color, $is-button:false) {
239
+
240
+ @if $bg {
241
+ $bg-lightness: lightness($bg);
242
+ background: $bg;
243
+ border-#{$default-float}: none;
244
+
245
+ // Control the font color based on background brightness
246
+ @if $bg-lightness > 70% or $bg == yellow { color: $input-prefix-font-color; }
247
+ @else { color: $input-prefix-font-color-alt; }
248
+ }
249
+
250
+ @if $border {
251
+ border-color: $border;
252
+ }
253
+
254
+ @if $is-button {
255
+ padding-#{$default-float}: 0;
256
+ padding-#{$opposite-direction}: 0;
257
+ padding-top: 0;
258
+ padding-bottom: 0;
259
+ text-align: center;
260
+ border: none;
261
+ }
262
+
263
+ }
264
+
265
+ // We use this mixin to style fieldsets
266
+ @mixin fieldset {
267
+ border: $fieldset-border-width $fieldset-border-style $fieldset-border-color;
268
+ padding: $fieldset-padding;
269
+ margin: $fieldset-margin;
270
+
271
+ // and legend styles
272
+ legend {
273
+ font-weight: $legend-font-weight;
274
+ background: $legend-bg;
275
+ padding: $legend-padding;
276
+ margin: 0;
277
+ margin-#{$default-float}: rem-calc(-3);
278
+ }
279
+ }
280
+
281
+ // @MIXIN
282
+ //
283
+ // We use this mixin to control border and background color of error inputs
284
+ // $color - Default: $alert-color (found in settings file)
285
+ @mixin form-error-color($color:$alert-color) {
286
+ border-color: $color;
287
+ background-color: rgba($color, 0.1);
288
+
289
+ // Go back to normal on focus
290
+ &:focus {
291
+ background: $input-focus-bg-color;
292
+ border-color: $input-focus-border-color;
293
+ }
294
+ }
295
+
296
+ // @MIXIN
297
+ //
298
+ // We use this simple mixin to style labels for error inputs
299
+ // $color - Default:$alert-color. Found in settings file
300
+ @mixin form-label-error-color($color:$alert-color) { color: $color; }
301
+
302
+ // @MIXIN
303
+ //
304
+ // We use this mixin to create error message styles
305
+ // $bg - Default: $alert-color (Found in settings file)
306
+ @mixin form-error-message($bg:$input-error-message-bg-color) {
307
+ display: block;
308
+ padding: $input-error-message-padding;
309
+ margin-top: $input-error-message-top;
310
+ margin-bottom: $form-spacing;
311
+ font-size: $input-error-message-font-size;
312
+ font-weight: $input-error-message-font-weight;
313
+ font-style: $input-error-message-font-style;
314
+
315
+ // We can control the text color based on the brightness of the background.
316
+ $bg-lightness: lightness($bg);
317
+ background: $bg;
318
+ @if $bg-lightness < 70% or $bg == yellow { color: $input-error-message-font-color; }
319
+ @else { color: $input-error-message-font-color-alt; }
320
+ }
321
+
322
+ // We use this mixin to style select elements
323
+ @mixin form-select {
324
+ -webkit-appearance: none !important;
325
+ border-radius: 0;
326
+ background-color: $select-bg-color;
327
+
328
+ // Hide the dropdown arrow shown in newer IE versions
329
+ &::-ms-expand {
330
+ display: none;
331
+ }
332
+
333
+ // The custom arrow has some fake horizontal padding so we can align it
334
+ // from the right side of the element without relying on CSS3
335
+ background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMTJweCIgeT0iMHB4IiB3aWR0aD0iMjRweCIgaGVpZ2h0PSIzcHgiIHZpZXdCb3g9IjAgMCA2IDMiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDYgMyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHBvbHlnb24gcG9pbnRzPSI1Ljk5MiwwIDIuOTkyLDMgLTAuMDA4LDAgIi8+PC9zdmc+);
336
+
337
+ // We can safely use leftmost and rightmost now
338
+ background-position: if($text-direction == 'rtl', 0%, 100%) center;
339
+
340
+ background-repeat: no-repeat;
341
+ border: {
342
+ style: $input-border-style;
343
+ width: $input-border-width;
344
+ color: $input-border-color;
345
+ }
346
+ padding: ($form-spacing / 2);
347
+ font-size: $input-font-size;
348
+ font-family: $body-font-family;
349
+ color: $input-font-color;
350
+ line-height: normal;
351
+ @include radius(0);
352
+ &.radius { @include radius($global-radius); }
353
+ &:hover {
354
+ background-color: $select-hover-bg-color;
355
+ border-color: $input-focus-border-color;
356
+ }
357
+ // Disabled Styles
358
+ &:disabled {
359
+ background-color: $input-disabled-bg;
360
+ cursor: $input-disabled-cursor;
361
+ }
362
+ }
363
+
364
+ // We use this mixin to turn on/off HTML5 number spinners
365
+ @mixin html5number($browser, $on:true) {
366
+ @if $on==false {
367
+ @if $browser==webkit {
368
+ -webkit-appearance: none;
369
+ margin: 0;
370
+ } @else if $browser==moz {
371
+ -moz-appearance: textfield;
372
+ }
373
+ }
374
+ }
375
+
376
+ @include exports("form") {
377
+ @if $include-html-form-classes {
378
+ /* Standard Forms */
379
+ form { margin: 0 0 $form-spacing; }
380
+
381
+ /* Using forms within rows, we need to set some defaults */
382
+ form .row { @include form-row-base; }
383
+
384
+ /* Label Styles */
385
+ label { @include form-label;
386
+ &.right { @include form-label(right,false); }
387
+ &.inline { @include form-label(inline,false); }
388
+ /* Styles for required inputs */
389
+ small {
390
+ text-transform: $form-label-small-transform;
391
+ color: scale-color($form-label-font-color, $lightness: 15%);
392
+ }
393
+ }
394
+
395
+ /* Attach elements to the beginning or end of an input */
396
+ .prefix,
397
+ .postfix { @include prefix-postfix-base; }
398
+
399
+ /* Adjust padding, alignment and radius if pre/post element is a button */
400
+ .postfix.button { @include button-size(false,false); @include postfix(false, false, true); }
401
+ .prefix.button { @include button-size(false,false); @include prefix(false, false, true); }
402
+
403
+ .prefix.button.radius { @include radius(0); @include side-radius($default-float, $button-radius); }
404
+ .postfix.button.radius { @include radius(0); @include side-radius($opposite-direction, $button-radius); }
405
+ .prefix.button.round { @include radius(0); @include side-radius($default-float, $button-round); }
406
+ .postfix.button.round { @include radius(0); @include side-radius($opposite-direction, $button-round); }
407
+
408
+ /* Separate prefix and postfix styles when on span or label so buttons keep their own */
409
+ span.prefix,label.prefix { @include prefix(); }
410
+ span.postfix,label.postfix { @include postfix(); }
411
+
412
+ /* We use this to get basic styling on all basic form elements */
413
+ #{text-inputs(all, 'input')} {
414
+ -webkit-appearance: none;
415
+ border-radius: 0;
416
+ @include form-element;
417
+ @if $input-include-glowing-effect == false {
418
+ @include single-transition(all, 0.15s, linear);
419
+ }
420
+ &.radius {
421
+ @include radius($input-border-radius);
422
+ }
423
+ }
424
+
425
+ form {
426
+ .row {
427
+ .prefix-radius.row.collapse {
428
+ input,
429
+ textarea,
430
+ select { @include radius(0); @include side-radius($opposite-direction, $button-radius); }
431
+ .prefix { @include radius(0); @include side-radius($default-float, $button-radius); }
432
+ }
433
+ .postfix-radius.row.collapse {
434
+ input,
435
+ textarea,
436
+ select { @include radius(0); @include side-radius($default-float, $button-radius); }
437
+ .postfix { @include radius(0); @include side-radius($opposite-direction, $button-radius); }
438
+ }
439
+ .prefix-round.row.collapse {
440
+ input,
441
+ textarea,
442
+ select { @include radius(0); @include side-radius($opposite-direction, $button-round); }
443
+ .prefix { @include radius(0); @include side-radius($default-float, $button-round); }
444
+ }
445
+ .postfix-round.row.collapse {
446
+ input,
447
+ textarea,
448
+ select { @include radius(0); @include side-radius($default-float, $button-round); }
449
+ .postfix { @include radius(0); @include side-radius($opposite-direction, $button-round); }
450
+ }
451
+ }
452
+ }
453
+
454
+ input[type="submit"] {
455
+ -webkit-appearance: none;
456
+ border-radius: 0;
457
+ }
458
+
459
+ /* Respect enforced amount of rows for textarea */
460
+ textarea[rows] {
461
+ height: auto;
462
+ }
463
+
464
+ /* Not allow resize out of parent */
465
+ textarea {
466
+ max-width: 100%;
467
+ }
468
+
469
+ /* Add height value for select elements to match text input height */
470
+ select {
471
+ @include form-select;
472
+ height: ($input-font-size + ($form-spacing * 1.5) - rem-calc(1));
473
+ }
474
+
475
+ /* Adjust margin for form elements below */
476
+ input[type="file"],
477
+ input[type="checkbox"],
478
+ input[type="radio"],
479
+ select {
480
+ margin: 0 0 $form-spacing 0;
481
+ }
482
+
483
+ input[type="checkbox"] + label,
484
+ input[type="radio"] + label {
485
+ display: inline-block;
486
+ margin-#{$default-float}: $form-spacing * .5;
487
+ margin-#{$opposite-direction}: $form-spacing;
488
+ margin-bottom: 0;
489
+ vertical-align: baseline;
490
+ }
491
+
492
+ /* Normalize file input width */
493
+ input[type="file"] {
494
+ width:100%;
495
+ }
496
+
497
+ /* HTML5 Number spinners settings */
498
+ input[type=number] {
499
+ @include html5number(moz, $input-number-spinners)
500
+ }
501
+ input[type="number"]::-webkit-inner-spin-button,
502
+ input[type="number"]::-webkit-outer-spin-button {
503
+ @include html5number(webkit, $input-number-spinners);
504
+ }
505
+
506
+ /* We add basic fieldset styling */
507
+ fieldset {
508
+ @include fieldset;
509
+ }
510
+
511
+ /* Error Handling */
512
+
513
+ #{data('abide')} {
514
+ .error small.error, .error span.error, span.error, small.error {
515
+ @include form-error-message;
516
+ }
517
+ span.error, small.error { display: none; }
518
+ }
519
+
520
+ span.error, small.error {
521
+ @include form-error-message;
522
+ }
523
+
524
+ .error {
525
+ input,
526
+ textarea,
527
+ select {
528
+ margin-bottom: 0;
529
+ }
530
+
531
+ input[type="checkbox"],
532
+ input[type="radio"] {
533
+ margin-bottom: $form-spacing
534
+ }
535
+
536
+ label,
537
+ label.error {
538
+ @include form-label-error-color;
539
+ }
540
+
541
+ small.error {
542
+ @include form-error-message;
543
+ }
544
+
545
+ > label {
546
+ > small {
547
+ color: scale-color($form-label-font-color, $lightness: 15%);
548
+ background: transparent;
549
+ padding: 0;
550
+ text-transform: $form-label-small-transform;
551
+ font-style: normal;
552
+ font-size: 60%;
553
+ margin: 0;
554
+ display: inline;
555
+ }
556
+ }
557
+
558
+ span.error-message {
559
+ display: block;
560
+ }
561
+ }
562
+
563
+ input.error,
564
+ textarea.error,
565
+ select.error {
566
+ margin-bottom: 0;
567
+ }
568
+ label.error { @include form-label-error-color; }
569
+ }
570
+ }