va_common 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -4
  3. data/app/assets/js/va_common_main.js +16 -1
  4. data/lib/va_common/version.rb +1 -1
  5. data/lib/va_common.rb +4 -0
  6. data/va_common.gemspec +15 -0
  7. metadata +200 -177
  8. data/app/assets/js/foundation/foundation.abide.js +0 -408
  9. data/app/assets/js/foundation/foundation.accordion.js +0 -88
  10. data/app/assets/js/foundation/foundation.alert.js +0 -43
  11. data/app/assets/js/foundation/foundation.clearing.js +0 -586
  12. data/app/assets/js/foundation/foundation.dropdown.js +0 -463
  13. data/app/assets/js/foundation/foundation.equalizer.js +0 -104
  14. data/app/assets/js/foundation/foundation.interchange.js +0 -359
  15. data/app/assets/js/foundation/foundation.joyride.js +0 -932
  16. data/app/assets/js/foundation/foundation.js +0 -725
  17. data/app/assets/js/foundation/foundation.magellan.js +0 -215
  18. data/app/assets/js/foundation/foundation.offcanvas.js +0 -152
  19. data/app/assets/js/foundation/foundation.orbit.js +0 -476
  20. data/app/assets/js/foundation/foundation.reveal.js +0 -498
  21. data/app/assets/js/foundation/foundation.slider.js +0 -281
  22. data/app/assets/js/foundation/foundation.tab.js +0 -249
  23. data/app/assets/js/foundation/foundation.tooltip.js +0 -339
  24. data/app/assets/js/foundation/foundation.topbar.js +0 -458
  25. data/app/assets/js/foundation.min.js +0 -6376
  26. data/app/assets/js/vendor/html5shiv.js +0 -8
  27. data/app/assets/js/vendor/jquery-1.11.0.min.js +0 -4
  28. data/app/assets/js/vendor/jquery.js +0 -9789
  29. data/app/assets/js/vendor/jquery.smooth-scroll.js +0 -255
  30. data/app/assets/js/vendor/jquery.stellar.js +0 -651
  31. data/app/assets/js/vendor/jquery.tipsy.js +0 -258
  32. data/app/assets/js/vendor/menu.js +0 -40
  33. data/app/assets/js/vendor/modernizr.custom.js +0 -4
  34. data/app/assets/js/vendor/respond.min.js +0 -6
  35. data/app/assets/js/vendor/selectivizr-1.0.3b.js +0 -560
  36. data/app/assets/js/vendor/tota11y.min.js +0 -28
  37. data/app/assets/js/vendor/wow.min.js +0 -2
  38. data/app/assets/stylesheets/foundation/_functions.scss +0 -146
  39. data/app/assets/stylesheets/foundation/_settings.scss +0 -1467
  40. data/app/assets/stylesheets/foundation/_variables.scss +0 -1286
  41. data/app/assets/stylesheets/foundation/components/_accordion.scss +0 -157
  42. data/app/assets/stylesheets/foundation/components/_alert-boxes.scss +0 -128
  43. data/app/assets/stylesheets/foundation/components/_block-grid.scss +0 -132
  44. data/app/assets/stylesheets/foundation/components/_breadcrumbs.scss +0 -132
  45. data/app/assets/stylesheets/foundation/components/_button-groups.scss +0 -200
  46. data/app/assets/stylesheets/foundation/components/_buttons.scss +0 -259
  47. data/app/assets/stylesheets/foundation/components/_clearing.scss +0 -256
  48. data/app/assets/stylesheets/foundation/components/_dropdown-buttons.scss +0 -131
  49. data/app/assets/stylesheets/foundation/components/_dropdown.scss +0 -262
  50. data/app/assets/stylesheets/foundation/components/_flex-video.scss +0 -51
  51. data/app/assets/stylesheets/foundation/components/_forms.scss +0 -570
  52. data/app/assets/stylesheets/foundation/components/_global.scss +0 -481
  53. data/app/assets/stylesheets/foundation/components/_grid.scss +0 -289
  54. data/app/assets/stylesheets/foundation/components/_icon-bar.scss +0 -358
  55. data/app/assets/stylesheets/foundation/components/_inline-lists.scss +0 -57
  56. data/app/assets/stylesheets/foundation/components/_joyride.scss +0 -222
  57. data/app/assets/stylesheets/foundation/components/_keystrokes.scss +0 -61
  58. data/app/assets/stylesheets/foundation/components/_labels.scss +0 -106
  59. data/app/assets/stylesheets/foundation/components/_magellan.scss +0 -34
  60. data/app/assets/stylesheets/foundation/components/_offcanvas.scss +0 -515
  61. data/app/assets/stylesheets/foundation/components/_orbit.scss +0 -368
  62. data/app/assets/stylesheets/foundation/components/_pagination.scss +0 -162
  63. data/app/assets/stylesheets/foundation/components/_panels.scss +0 -101
  64. data/app/assets/stylesheets/foundation/components/_pricing-tables.scss +0 -150
  65. data/app/assets/stylesheets/foundation/components/_progress-bars.scss +0 -79
  66. data/app/assets/stylesheets/foundation/components/_range-slider.scss +0 -169
  67. data/app/assets/stylesheets/foundation/components/_reveal.scss +0 -202
  68. data/app/assets/stylesheets/foundation/components/_side-nav.scss +0 -116
  69. data/app/assets/stylesheets/foundation/components/_split-buttons.scss +0 -199
  70. data/app/assets/stylesheets/foundation/components/_sub-nav.scss +0 -123
  71. data/app/assets/stylesheets/foundation/components/_switches.scss +0 -238
  72. data/app/assets/stylesheets/foundation/components/_tables.scss +0 -135
  73. data/app/assets/stylesheets/foundation/components/_tabs.scss +0 -123
  74. data/app/assets/stylesheets/foundation/components/_thumbs.scss +0 -66
  75. data/app/assets/stylesheets/foundation/components/_toolbar.scss +0 -70
  76. data/app/assets/stylesheets/foundation/components/_tooltips.scss +0 -142
  77. data/app/assets/stylesheets/foundation/components/_top-bar.scss +0 -691
  78. data/app/assets/stylesheets/foundation/components/_type.scss +0 -525
  79. data/app/assets/stylesheets/foundation/components/_visibility.scss +0 -408
  80. data/app/assets/stylesheets/lib/_normalize.scss +0 -427
  81. data/app/assets/stylesheets/lib/bourbon/_bourbon-deprecated-upcoming.scss +0 -411
  82. data/app/assets/stylesheets/lib/bourbon/_bourbon.scss +0 -87
  83. data/app/assets/stylesheets/lib/bourbon/addons/_border-color.scss +0 -26
  84. data/app/assets/stylesheets/lib/bourbon/addons/_border-radius.scss +0 -48
  85. data/app/assets/stylesheets/lib/bourbon/addons/_border-style.scss +0 -25
  86. data/app/assets/stylesheets/lib/bourbon/addons/_border-width.scss +0 -25
  87. data/app/assets/stylesheets/lib/bourbon/addons/_buttons.scss +0 -64
  88. data/app/assets/stylesheets/lib/bourbon/addons/_clearfix.scss +0 -25
  89. data/app/assets/stylesheets/lib/bourbon/addons/_ellipsis.scss +0 -30
  90. data/app/assets/stylesheets/lib/bourbon/addons/_font-stacks.scss +0 -31
  91. data/app/assets/stylesheets/lib/bourbon/addons/_hide-text.scss +0 -27
  92. data/app/assets/stylesheets/lib/bourbon/addons/_margin.scss +0 -26
  93. data/app/assets/stylesheets/lib/bourbon/addons/_padding.scss +0 -26
  94. data/app/assets/stylesheets/lib/bourbon/addons/_position.scss +0 -48
  95. data/app/assets/stylesheets/lib/bourbon/addons/_prefixer.scss +0 -66
  96. data/app/assets/stylesheets/lib/bourbon/addons/_retina-image.scss +0 -25
  97. data/app/assets/stylesheets/lib/bourbon/addons/_size.scss +0 -51
  98. data/app/assets/stylesheets/lib/bourbon/addons/_text-inputs.scss +0 -112
  99. data/app/assets/stylesheets/lib/bourbon/addons/_timing-functions.scss +0 -34
  100. data/app/assets/stylesheets/lib/bourbon/addons/_triangle.scss +0 -63
  101. data/app/assets/stylesheets/lib/bourbon/addons/_word-wrap.scss +0 -29
  102. data/app/assets/stylesheets/lib/bourbon/css3/_animation.scss +0 -43
  103. data/app/assets/stylesheets/lib/bourbon/css3/_appearance.scss +0 -3
  104. data/app/assets/stylesheets/lib/bourbon/css3/_backface-visibility.scss +0 -3
  105. data/app/assets/stylesheets/lib/bourbon/css3/_background-image.scss +0 -42
  106. data/app/assets/stylesheets/lib/bourbon/css3/_background.scss +0 -55
  107. data/app/assets/stylesheets/lib/bourbon/css3/_border-image.scss +0 -59
  108. data/app/assets/stylesheets/lib/bourbon/css3/_calc.scss +0 -4
  109. data/app/assets/stylesheets/lib/bourbon/css3/_columns.scss +0 -47
  110. data/app/assets/stylesheets/lib/bourbon/css3/_filter.scss +0 -4
  111. data/app/assets/stylesheets/lib/bourbon/css3/_flex-box.scss +0 -287
  112. data/app/assets/stylesheets/lib/bourbon/css3/_font-face.scss +0 -24
  113. data/app/assets/stylesheets/lib/bourbon/css3/_font-feature-settings.scss +0 -4
  114. data/app/assets/stylesheets/lib/bourbon/css3/_hidpi-media-query.scss +0 -10
  115. data/app/assets/stylesheets/lib/bourbon/css3/_hyphens.scss +0 -4
  116. data/app/assets/stylesheets/lib/bourbon/css3/_image-rendering.scss +0 -14
  117. data/app/assets/stylesheets/lib/bourbon/css3/_keyframes.scss +0 -36
  118. data/app/assets/stylesheets/lib/bourbon/css3/_linear-gradient.scss +0 -38
  119. data/app/assets/stylesheets/lib/bourbon/css3/_perspective.scss +0 -8
  120. data/app/assets/stylesheets/lib/bourbon/css3/_placeholder.scss +0 -8
  121. data/app/assets/stylesheets/lib/bourbon/css3/_radial-gradient.scss +0 -39
  122. data/app/assets/stylesheets/lib/bourbon/css3/_selection.scss +0 -42
  123. data/app/assets/stylesheets/lib/bourbon/css3/_text-decoration.scss +0 -19
  124. data/app/assets/stylesheets/lib/bourbon/css3/_transform.scss +0 -15
  125. data/app/assets/stylesheets/lib/bourbon/css3/_transition.scss +0 -71
  126. data/app/assets/stylesheets/lib/bourbon/css3/_user-select.scss +0 -3
  127. data/app/assets/stylesheets/lib/bourbon/functions/_assign-inputs.scss +0 -11
  128. data/app/assets/stylesheets/lib/bourbon/functions/_contains-falsy.scss +0 -20
  129. data/app/assets/stylesheets/lib/bourbon/functions/_contains.scss +0 -26
  130. data/app/assets/stylesheets/lib/bourbon/functions/_is-length.scss +0 -11
  131. data/app/assets/stylesheets/lib/bourbon/functions/_is-light.scss +0 -21
  132. data/app/assets/stylesheets/lib/bourbon/functions/_is-number.scss +0 -11
  133. data/app/assets/stylesheets/lib/bourbon/functions/_is-size.scss +0 -13
  134. data/app/assets/stylesheets/lib/bourbon/functions/_modular-scale.scss +0 -69
  135. data/app/assets/stylesheets/lib/bourbon/functions/_px-to-em.scss +0 -13
  136. data/app/assets/stylesheets/lib/bourbon/functions/_px-to-rem.scss +0 -15
  137. data/app/assets/stylesheets/lib/bourbon/functions/_shade.scss +0 -24
  138. data/app/assets/stylesheets/lib/bourbon/functions/_strip-units.scss +0 -17
  139. data/app/assets/stylesheets/lib/bourbon/functions/_tint.scss +0 -24
  140. data/app/assets/stylesheets/lib/bourbon/functions/_transition-property-name.scss +0 -22
  141. data/app/assets/stylesheets/lib/bourbon/functions/_unpack.scss +0 -27
  142. data/app/assets/stylesheets/lib/bourbon/helpers/_convert-units.scss +0 -21
  143. data/app/assets/stylesheets/lib/bourbon/helpers/_directional-values.scss +0 -96
  144. data/app/assets/stylesheets/lib/bourbon/helpers/_font-source-declaration.scss +0 -43
  145. data/app/assets/stylesheets/lib/bourbon/helpers/_gradient-positions-parser.scss +0 -13
  146. data/app/assets/stylesheets/lib/bourbon/helpers/_linear-angle-parser.scss +0 -25
  147. data/app/assets/stylesheets/lib/bourbon/helpers/_linear-gradient-parser.scss +0 -41
  148. data/app/assets/stylesheets/lib/bourbon/helpers/_linear-positions-parser.scss +0 -61
  149. data/app/assets/stylesheets/lib/bourbon/helpers/_linear-side-corner-parser.scss +0 -31
  150. data/app/assets/stylesheets/lib/bourbon/helpers/_radial-arg-parser.scss +0 -69
  151. data/app/assets/stylesheets/lib/bourbon/helpers/_radial-gradient-parser.scss +0 -50
  152. data/app/assets/stylesheets/lib/bourbon/helpers/_radial-positions-parser.scss +0 -18
  153. data/app/assets/stylesheets/lib/bourbon/helpers/_render-gradients.scss +0 -26
  154. data/app/assets/stylesheets/lib/bourbon/helpers/_shape-size-stripper.scss +0 -10
  155. data/app/assets/stylesheets/lib/bourbon/helpers/_str-to-num.scss +0 -50
  156. data/app/assets/stylesheets/lib/bourbon/settings/_asset-pipeline.scss +0 -7
  157. data/app/assets/stylesheets/lib/bourbon/settings/_prefixer.scss +0 -9
  158. data/app/assets/stylesheets/lib/bourbon/settings/_px-to-em.scss +0 -1
  159. data/app/assets/stylesheets/lib/neat/_neat-helpers.scss +0 -8
  160. data/app/assets/stylesheets/lib/neat/_neat.scss +0 -23
  161. data/app/assets/stylesheets/lib/neat/functions/_new-breakpoint.scss +0 -49
  162. data/app/assets/stylesheets/lib/neat/functions/_private.scss +0 -114
  163. data/app/assets/stylesheets/lib/neat/grid/_box-sizing.scss +0 -15
  164. data/app/assets/stylesheets/lib/neat/grid/_direction-context.scss +0 -33
  165. data/app/assets/stylesheets/lib/neat/grid/_display-context.scss +0 -28
  166. data/app/assets/stylesheets/lib/neat/grid/_fill-parent.scss +0 -22
  167. data/app/assets/stylesheets/lib/neat/grid/_media.scss +0 -92
  168. data/app/assets/stylesheets/lib/neat/grid/_omega.scss +0 -87
  169. data/app/assets/stylesheets/lib/neat/grid/_outer-container.scss +0 -38
  170. data/app/assets/stylesheets/lib/neat/grid/_pad.scss +0 -25
  171. data/app/assets/stylesheets/lib/neat/grid/_private.scss +0 -35
  172. data/app/assets/stylesheets/lib/neat/grid/_row.scss +0 -52
  173. data/app/assets/stylesheets/lib/neat/grid/_shift.scss +0 -50
  174. data/app/assets/stylesheets/lib/neat/grid/_span-columns.scss +0 -94
  175. data/app/assets/stylesheets/lib/neat/grid/_to-deprecate.scss +0 -97
  176. data/app/assets/stylesheets/lib/neat/grid/_visual-grid.scss +0 -42
  177. data/app/assets/stylesheets/lib/neat/settings/_disable-warnings.scss +0 -13
  178. data/app/assets/stylesheets/lib/neat/settings/_grid.scss +0 -51
  179. data/app/assets/stylesheets/lib/neat/settings/_visual-grid.scss +0 -27
  180. data/app/assets/stylesheets/va_common_main.css.scss +0 -18
  181. /data/app/assets/js/{vendor/scroll-settings.js → scroll-settings.js} +0 -0
  182. /data/app/assets/js/{vendor/stellar-settings.js → stellar-settings.js} +0 -0
@@ -1,570 +0,0 @@
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
- }