asset_box 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 (211) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +60 -0
  3. data/.rspec +3 -0
  4. data/.travis.yml +7 -0
  5. data/CODE_OF_CONDUCT.md +74 -0
  6. data/Gemfile +6 -0
  7. data/Gemfile.lock +35 -0
  8. data/LICENSE.txt +21 -0
  9. data/README.md +43 -0
  10. data/Rakefile +6 -0
  11. data/asset_box.gemspec +42 -0
  12. data/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
  13. data/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +288 -0
  14. data/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
  15. data/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
  16. data/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
  17. data/assets/fonts/font-awesome/fa-brands-400.eot +0 -0
  18. data/assets/fonts/font-awesome/fa-brands-400.svg +3717 -0
  19. data/assets/fonts/font-awesome/fa-brands-400.ttf +0 -0
  20. data/assets/fonts/font-awesome/fa-brands-400.woff +0 -0
  21. data/assets/fonts/font-awesome/fa-brands-400.woff2 +0 -0
  22. data/assets/fonts/font-awesome/fa-regular-400.eot +0 -0
  23. data/assets/fonts/font-awesome/fa-regular-400.svg +801 -0
  24. data/assets/fonts/font-awesome/fa-regular-400.ttf +0 -0
  25. data/assets/fonts/font-awesome/fa-regular-400.woff +0 -0
  26. data/assets/fonts/font-awesome/fa-regular-400.woff2 +0 -0
  27. data/assets/fonts/font-awesome/fa-solid-900.eot +0 -0
  28. data/assets/fonts/font-awesome/fa-solid-900.svg +5028 -0
  29. data/assets/fonts/font-awesome/fa-solid-900.ttf +0 -0
  30. data/assets/fonts/font-awesome/fa-solid-900.woff +0 -0
  31. data/assets/fonts/font-awesome/fa-solid-900.woff2 +0 -0
  32. data/assets/images/bootstrap/bg.png +0 -0
  33. data/assets/images/bootstrap/bg_2.png +0 -0
  34. data/assets/images/bootstrap/bg_3.png +0 -0
  35. data/assets/images/bootstrap/bg_4.png +0 -0
  36. data/assets/images/bootstrap/bg_5.png +0 -0
  37. data/assets/images/bootstrap/dark_dots.png +0 -0
  38. data/assets/images/bootstrap/light_dots.png +0 -0
  39. data/assets/images/bootstrap/line.png +0 -0
  40. data/assets/images/bootstrap/line_detail.png +0 -0
  41. data/assets/images/bootstrap/note_dot.png +0 -0
  42. data/assets/images/bootstrap/timer-piece.png +0 -0
  43. data/assets/javascripts/app/bootstrap-datepicker.js +1395 -0
  44. data/assets/javascripts/app/bootstrap-fileupload.min.js +7 -0
  45. data/assets/javascripts/app/bootstrap-modal.js +378 -0
  46. data/assets/javascripts/app/bootstrap-modalmanager.js +423 -0
  47. data/assets/javascripts/app/bootstrap-switch.min.js +22 -0
  48. data/assets/javascripts/app/daterangepicker.js +1635 -0
  49. data/assets/javascripts/app/debounce.js +1492 -0
  50. data/assets/javascripts/app/jquery.appear.js +101 -0
  51. data/assets/javascripts/app/jquery.inputlimiter.1.3.1.min.js +11 -0
  52. data/assets/javascripts/app/jquery.mousewheel.js +84 -0
  53. data/assets/javascripts/app/jquery.serialScroll.min.js +7 -0
  54. data/assets/javascripts/app/moment.min.js +7 -0
  55. data/assets/javascripts/app/perfect-scrollbar.js +584 -0
  56. data/assets/javascripts/app/subview.js +392 -0
  57. data/assets/javascripts/app/velocity.min.js +8 -0
  58. data/assets/javascripts/asset_box.js +16 -0
  59. data/assets/javascripts/bootstrap-sprockets.js +12 -0
  60. data/assets/javascripts/bootstrap.js +2580 -0
  61. data/assets/javascripts/bootstrap.min.js +6 -0
  62. data/assets/javascripts/bootstrap/affix.js +164 -0
  63. data/assets/javascripts/bootstrap/alert.js +95 -0
  64. data/assets/javascripts/bootstrap/button.js +125 -0
  65. data/assets/javascripts/bootstrap/carousel.js +246 -0
  66. data/assets/javascripts/bootstrap/collapse.js +212 -0
  67. data/assets/javascripts/bootstrap/dropdown.js +165 -0
  68. data/assets/javascripts/bootstrap/modal.js +358 -0
  69. data/assets/javascripts/bootstrap/popover.js +123 -0
  70. data/assets/javascripts/bootstrap/scrollspy.js +172 -0
  71. data/assets/javascripts/bootstrap/tab.js +155 -0
  72. data/assets/javascripts/bootstrap/tooltip.js +677 -0
  73. data/assets/javascripts/bootstrap/transition.js +59 -0
  74. data/assets/stylesheets/_asset_box.scss +760 -0
  75. data/assets/stylesheets/_bootstrap-compass.scss +9 -0
  76. data/assets/stylesheets/_bootstrap-mincer.scss +19 -0
  77. data/assets/stylesheets/_bootstrap-sprockets.scss +9 -0
  78. data/assets/stylesheets/_bootstrap.scss +56 -0
  79. data/assets/stylesheets/_bootstrap_login.scss +166 -0
  80. data/assets/stylesheets/_font-awesome-compass.scss +5 -0
  81. data/assets/stylesheets/_font-awesome-sprockets.scss +5 -0
  82. data/assets/stylesheets/_font-awesome.scss +17 -0
  83. data/assets/stylesheets/_font-awesome_v4-shims.scss +6 -0
  84. data/assets/stylesheets/_load_bootstrap.scss +12 -0
  85. data/assets/stylesheets/app/_base.scss +136 -0
  86. data/assets/stylesheets/app/_buttons.scss +1149 -0
  87. data/assets/stylesheets/app/_calendar.scss +343 -0
  88. data/assets/stylesheets/app/_ckeditor.scss +123 -0
  89. data/assets/stylesheets/app/_date-picker.scss +193 -0
  90. data/assets/stylesheets/app/_daterangepicker.scss +269 -0
  91. data/assets/stylesheets/app/_dropdown-menu.scss +137 -0
  92. data/assets/stylesheets/app/_error.scss +84 -0
  93. data/assets/stylesheets/app/_file-upload.scss +16 -0
  94. data/assets/stylesheets/app/_footer.scss +59 -0
  95. data/assets/stylesheets/app/_form-elements.scss +273 -0
  96. data/assets/stylesheets/app/_gallery.scss +205 -0
  97. data/assets/stylesheets/app/_header.scss +158 -0
  98. data/assets/stylesheets/app/_horizontal-menu.scss +169 -0
  99. data/assets/stylesheets/app/_icons.scss +47 -0
  100. data/assets/stylesheets/app/_inputlimiter.scss +34 -0
  101. data/assets/stylesheets/app/_invoice.scss +53 -0
  102. data/assets/stylesheets/app/_lock-screen.scss +72 -0
  103. data/assets/stylesheets/app/_login.scss +105 -0
  104. data/assets/stylesheets/app/_main-container.scss +297 -0
  105. data/assets/stylesheets/app/_messages.scss +311 -0
  106. data/assets/stylesheets/app/_pageslide_left.scss +283 -0
  107. data/assets/stylesheets/app/_pageslide_right.scss +350 -0
  108. data/assets/stylesheets/app/_pagination.scss +254 -0
  109. data/assets/stylesheets/app/_panels.scss +589 -0
  110. data/assets/stylesheets/app/_perfect-scrollbar.scss +111 -0
  111. data/assets/stylesheets/app/_slidingbar.scss +42 -0
  112. data/assets/stylesheets/app/_subview.scss +342 -0
  113. data/assets/stylesheets/app/_tables.scss +68 -0
  114. data/assets/stylesheets/app/_tabs.scss +251 -0
  115. data/assets/stylesheets/app/_tags-input.scss +46 -0
  116. data/assets/stylesheets/app/_theme-style8.scss +308 -0
  117. data/assets/stylesheets/app/_timeline.scss +359 -0
  118. data/assets/stylesheets/app/_user-profile.scss +99 -0
  119. data/assets/stylesheets/app/_utilities.scss +643 -0
  120. data/assets/stylesheets/bootstrap/_alerts.scss +73 -0
  121. data/assets/stylesheets/bootstrap/_badges.scss +68 -0
  122. data/assets/stylesheets/bootstrap/_breadcrumbs.scss +28 -0
  123. data/assets/stylesheets/bootstrap/_button-groups.scss +244 -0
  124. data/assets/stylesheets/bootstrap/_buttons.scss +168 -0
  125. data/assets/stylesheets/bootstrap/_carousel.scss +271 -0
  126. data/assets/stylesheets/bootstrap/_close.scss +37 -0
  127. data/assets/stylesheets/bootstrap/_code.scss +69 -0
  128. data/assets/stylesheets/bootstrap/_component-animations.scss +38 -0
  129. data/assets/stylesheets/bootstrap/_dropdowns.scss +213 -0
  130. data/assets/stylesheets/bootstrap/_forms.scss +607 -0
  131. data/assets/stylesheets/bootstrap/_glyphicons.scss +307 -0
  132. data/assets/stylesheets/bootstrap/_grid.scss +94 -0
  133. data/assets/stylesheets/bootstrap/_input-groups.scss +171 -0
  134. data/assets/stylesheets/bootstrap/_jumbotron.scss +54 -0
  135. data/assets/stylesheets/bootstrap/_labels.scss +66 -0
  136. data/assets/stylesheets/bootstrap/_list-group.scss +128 -0
  137. data/assets/stylesheets/bootstrap/_media.scss +66 -0
  138. data/assets/stylesheets/bootstrap/_mixins.scss +40 -0
  139. data/assets/stylesheets/bootstrap/_modals.scss +150 -0
  140. data/assets/stylesheets/bootstrap/_navbar.scss +656 -0
  141. data/assets/stylesheets/bootstrap/_navs.scss +242 -0
  142. data/assets/stylesheets/bootstrap/_normalize.scss +427 -0
  143. data/assets/stylesheets/bootstrap/_pager.scss +54 -0
  144. data/assets/stylesheets/bootstrap/_pagination.scss +86 -0
  145. data/assets/stylesheets/bootstrap/_panels.scss +271 -0
  146. data/assets/stylesheets/bootstrap/_popovers.scss +126 -0
  147. data/assets/stylesheets/bootstrap/_print.scss +99 -0
  148. data/assets/stylesheets/bootstrap/_progress-bars.scss +87 -0
  149. data/assets/stylesheets/bootstrap/_responsive-embed.scss +35 -0
  150. data/assets/stylesheets/bootstrap/_responsive-utilities.scss +179 -0
  151. data/assets/stylesheets/bootstrap/_scaffolding.scss +161 -0
  152. data/assets/stylesheets/bootstrap/_tables.scss +234 -0
  153. data/assets/stylesheets/bootstrap/_theme.scss +295 -0
  154. data/assets/stylesheets/bootstrap/_thumbnails.scss +38 -0
  155. data/assets/stylesheets/bootstrap/_tooltip.scss +112 -0
  156. data/assets/stylesheets/bootstrap/_type.scss +298 -0
  157. data/assets/stylesheets/bootstrap/_utilities.scss +55 -0
  158. data/assets/stylesheets/bootstrap/_variables.scss +874 -0
  159. data/assets/stylesheets/bootstrap/_wells.scss +29 -0
  160. data/assets/stylesheets/bootstrap/mixins/_alerts.scss +15 -0
  161. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +12 -0
  162. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +18 -0
  163. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +61 -0
  164. data/assets/stylesheets/bootstrap/mixins/_center-block.scss +7 -0
  165. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +22 -0
  166. data/assets/stylesheets/bootstrap/mixins/_forms.scss +88 -0
  167. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +56 -0
  168. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +81 -0
  169. data/assets/stylesheets/bootstrap/mixins/_grid.scss +122 -0
  170. data/assets/stylesheets/bootstrap/mixins/_hide-text.scss +21 -0
  171. data/assets/stylesheets/bootstrap/mixins/_image.scss +28 -0
  172. data/assets/stylesheets/bootstrap/mixins/_labels.scss +12 -0
  173. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +32 -0
  174. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +10 -0
  175. data/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +9 -0
  176. data/assets/stylesheets/bootstrap/mixins/_opacity.scss +7 -0
  177. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +24 -0
  178. data/assets/stylesheets/bootstrap/mixins/_panels.scss +24 -0
  179. data/assets/stylesheets/bootstrap/mixins/_progress-bar.scss +10 -0
  180. data/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +8 -0
  181. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +18 -0
  182. data/assets/stylesheets/bootstrap/mixins/_resize.scss +6 -0
  183. data/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +17 -0
  184. data/assets/stylesheets/bootstrap/mixins/_size.scss +10 -0
  185. data/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +9 -0
  186. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +28 -0
  187. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +12 -0
  188. data/assets/stylesheets/bootstrap/mixins/_text-overflow.scss +8 -0
  189. data/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +222 -0
  190. data/assets/stylesheets/font-awesome/_animated.scss +20 -0
  191. data/assets/stylesheets/font-awesome/_bordered-pulled.scss +20 -0
  192. data/assets/stylesheets/font-awesome/_core.scss +21 -0
  193. data/assets/stylesheets/font-awesome/_fixed-width.scss +6 -0
  194. data/assets/stylesheets/font-awesome/_icons.scss +1462 -0
  195. data/assets/stylesheets/font-awesome/_larger.scss +23 -0
  196. data/assets/stylesheets/font-awesome/_list.scss +18 -0
  197. data/assets/stylesheets/font-awesome/_mixins.scss +56 -0
  198. data/assets/stylesheets/font-awesome/_path.scss +56 -0
  199. data/assets/stylesheets/font-awesome/_rotated-flipped.scss +24 -0
  200. data/assets/stylesheets/font-awesome/_screen-reader.scss +5 -0
  201. data/assets/stylesheets/font-awesome/_shims.scss +2066 -0
  202. data/assets/stylesheets/font-awesome/_stacked.scss +31 -0
  203. data/assets/stylesheets/font-awesome/_variables.scss +1482 -0
  204. data/bin/console +14 -0
  205. data/bin/setup +8 -0
  206. data/lib/asset_box.rb +89 -0
  207. data/lib/asset_box/rails/engine.rb +22 -0
  208. data/lib/asset_box/rails/helpers.rb +17 -0
  209. data/lib/asset_box/rails/railtie.rb +13 -0
  210. data/lib/asset_box/version.rb +3 -0
  211. metadata +301 -0
@@ -0,0 +1,607 @@
1
+ //
2
+ // Forms
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Normalize non-controls
7
+ //
8
+ // Restyle and baseline non-control form elements.
9
+
10
+ fieldset {
11
+ // Chrome and Firefox set a `min-width: min-content;` on fieldsets,
12
+ // so we reset that to ensure it behaves more like a standard block element.
13
+ // See https://github.com/twbs/bootstrap/issues/12359.
14
+ min-width: 0;
15
+ padding: 0;
16
+ margin: 0;
17
+ border: 0;
18
+ }
19
+
20
+ legend {
21
+ display: block;
22
+ width: 100%;
23
+ padding: 0;
24
+ margin-bottom: $line-height-computed;
25
+ font-size: ($font-size-base * 1.5);
26
+ line-height: inherit;
27
+ color: $legend-color;
28
+ border: 0;
29
+ border-bottom: 1px solid $legend-border-color;
30
+ }
31
+
32
+ label {
33
+ display: inline-block;
34
+ max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141)
35
+ margin-bottom: 5px;
36
+ font-weight: 700;
37
+ }
38
+
39
+
40
+ // Normalize form controls
41
+ //
42
+ // While most of our form styles require extra classes, some basic normalization
43
+ // is required to ensure optimum display with or without those classes to better
44
+ // address browser inconsistencies.
45
+
46
+ input[type="search"] {
47
+ // Override content-box in Normalize (* isn't specific enough)
48
+ @include box-sizing(border-box);
49
+
50
+ // Search inputs in iOS
51
+ //
52
+ // This overrides the extra rounded corners on search inputs in iOS so that our
53
+ // `.form-control` class can properly style them. Note that this cannot simply
54
+ // be added to `.form-control` as it's not specific enough. For details, see
55
+ // https://github.com/twbs/bootstrap/issues/11586.
56
+ -webkit-appearance: none;
57
+ appearance: none;
58
+ }
59
+
60
+ // Position radios and checkboxes better
61
+ input[type="radio"],
62
+ input[type="checkbox"] {
63
+ margin: 4px 0 0;
64
+ margin-top: 1px \9; // IE8-9
65
+ line-height: normal;
66
+
67
+ // Apply same disabled cursor tweak as for inputs
68
+ // Some special care is needed because <label>s don't inherit their parent's `cursor`.
69
+ //
70
+ // Note: Neither radios nor checkboxes can be readonly.
71
+ &[disabled],
72
+ &.disabled,
73
+ fieldset[disabled] & {
74
+ cursor: $cursor-disabled;
75
+ }
76
+ }
77
+
78
+ input[type="file"] {
79
+ display: block;
80
+ }
81
+
82
+ // Make range inputs behave like textual form controls
83
+ input[type="range"] {
84
+ display: block;
85
+ width: 100%;
86
+ }
87
+
88
+ // Make multiple select elements height not fixed
89
+ select[multiple],
90
+ select[size] {
91
+ height: auto;
92
+ }
93
+
94
+ // Focus for file, radio, and checkbox
95
+ input[type="file"]:focus,
96
+ input[type="radio"]:focus,
97
+ input[type="checkbox"]:focus {
98
+ @include tab-focus;
99
+ }
100
+
101
+ // Adjust output element
102
+ output {
103
+ display: block;
104
+ padding-top: ($padding-base-vertical + 1);
105
+ font-size: $font-size-base;
106
+ line-height: $line-height-base;
107
+ color: $input-color;
108
+ }
109
+
110
+
111
+ // Common form controls
112
+ //
113
+ // Shared size and type resets for form controls. Apply `.form-control` to any
114
+ // of the following form controls:
115
+ //
116
+ // select
117
+ // textarea
118
+ // input[type="text"]
119
+ // input[type="password"]
120
+ // input[type="datetime"]
121
+ // input[type="datetime-local"]
122
+ // input[type="date"]
123
+ // input[type="month"]
124
+ // input[type="time"]
125
+ // input[type="week"]
126
+ // input[type="number"]
127
+ // input[type="email"]
128
+ // input[type="url"]
129
+ // input[type="search"]
130
+ // input[type="tel"]
131
+ // input[type="color"]
132
+
133
+ .form-control {
134
+ display: block;
135
+ width: 100%;
136
+ height: $input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
137
+ padding: $padding-base-vertical $padding-base-horizontal;
138
+ font-size: $font-size-base;
139
+ line-height: $line-height-base;
140
+ color: $input-color;
141
+ background-color: $input-bg;
142
+ background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
143
+ border: 1px solid $input-border;
144
+ border-radius: $input-border-radius; // Note: This has no effect on <select>s in some browsers, due to the limited stylability of <select>s in CSS.
145
+ @include box-shadow(inset 0 1px 1px rgba(0, 0, 0, .075));
146
+ @include transition(border-color ease-in-out .15s, box-shadow ease-in-out .15s);
147
+
148
+ // Customize the `:focus` state to imitate native WebKit styles.
149
+ @include form-control-focus;
150
+
151
+ // Placeholder
152
+ @include placeholder;
153
+
154
+ // Unstyle the caret on `<select>`s in IE10+.
155
+ &::-ms-expand {
156
+ background-color: transparent;
157
+ border: 0;
158
+ }
159
+
160
+ // Disabled and read-only inputs
161
+ //
162
+ // HTML5 says that controls under a fieldset > legend:first-child won't be
163
+ // disabled if the fieldset is disabled. Due to implementation difficulty, we
164
+ // don't honor that edge case; we style them as disabled anyway.
165
+ &[disabled],
166
+ &[readonly],
167
+ fieldset[disabled] & {
168
+ background-color: $input-bg-disabled;
169
+ opacity: 1; // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655
170
+ }
171
+
172
+ &[disabled],
173
+ fieldset[disabled] & {
174
+ cursor: $cursor-disabled;
175
+ }
176
+
177
+ // [converter] extracted textarea& to textarea.form-control
178
+ }
179
+
180
+ // Reset height for `textarea`s
181
+ textarea.form-control {
182
+ height: auto;
183
+ }
184
+
185
+
186
+ // Special styles for iOS temporal inputs
187
+ //
188
+ // In Mobile Safari, setting `display: block` on temporal inputs causes the
189
+ // text within the input to become vertically misaligned. As a workaround, we
190
+ // set a pixel line-height that matches the given height of the input, but only
191
+ // for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848
192
+ //
193
+ // Note that as of 9.3, iOS doesn't support `week`.
194
+
195
+ @media screen and (-webkit-min-device-pixel-ratio: 0) {
196
+ input[type="date"],
197
+ input[type="time"],
198
+ input[type="datetime-local"],
199
+ input[type="month"] {
200
+ &.form-control {
201
+ line-height: $input-height-base;
202
+ }
203
+
204
+ &.input-sm,
205
+ .input-group-sm & {
206
+ line-height: $input-height-small;
207
+ }
208
+
209
+ &.input-lg,
210
+ .input-group-lg & {
211
+ line-height: $input-height-large;
212
+ }
213
+ }
214
+ }
215
+
216
+
217
+ // Form groups
218
+ //
219
+ // Designed to help with the organization and spacing of vertical forms. For
220
+ // horizontal forms, use the predefined grid classes.
221
+
222
+ .form-group {
223
+ margin-bottom: $form-group-margin-bottom;
224
+ }
225
+
226
+
227
+ // Checkboxes and radios
228
+ //
229
+ // Indent the labels to position radios/checkboxes as hanging controls.
230
+
231
+ .radio,
232
+ .checkbox {
233
+ position: relative;
234
+ display: block;
235
+ margin-top: 10px;
236
+ margin-bottom: 10px;
237
+
238
+ // These are used on elements with <label> descendants
239
+ &.disabled,
240
+ fieldset[disabled] & {
241
+ label {
242
+ cursor: $cursor-disabled;
243
+ }
244
+ }
245
+
246
+ label {
247
+ min-height: $line-height-computed; // Ensure the input doesn't jump when there is no text
248
+ padding-left: 20px;
249
+ margin-bottom: 0;
250
+ font-weight: 400;
251
+ cursor: pointer;
252
+ }
253
+ }
254
+ .radio input[type="radio"],
255
+ .radio-inline input[type="radio"],
256
+ .checkbox input[type="checkbox"],
257
+ .checkbox-inline input[type="checkbox"] {
258
+ position: absolute;
259
+ margin-top: 4px \9;
260
+ margin-left: -20px;
261
+ }
262
+
263
+ .radio + .radio,
264
+ .checkbox + .checkbox {
265
+ margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing
266
+ }
267
+
268
+ // Radios and checkboxes on same line
269
+ .radio-inline,
270
+ .checkbox-inline {
271
+ position: relative;
272
+ display: inline-block;
273
+ padding-left: 20px;
274
+ margin-bottom: 0;
275
+ font-weight: 400;
276
+ vertical-align: middle;
277
+ cursor: pointer;
278
+
279
+ // These are used directly on <label>s
280
+ &.disabled,
281
+ fieldset[disabled] & {
282
+ cursor: $cursor-disabled;
283
+ }
284
+ }
285
+ .radio-inline + .radio-inline,
286
+ .checkbox-inline + .checkbox-inline {
287
+ margin-top: 0;
288
+ margin-left: 10px; // space out consecutive inline controls
289
+ }
290
+
291
+
292
+ // Static form control text
293
+ //
294
+ // Apply class to a `p` element to make any string of text align with labels in
295
+ // a horizontal form layout.
296
+
297
+ .form-control-static {
298
+ min-height: ($line-height-computed + $font-size-base);
299
+ // Size it appropriately next to real form controls
300
+ padding-top: ($padding-base-vertical + 1);
301
+ padding-bottom: ($padding-base-vertical + 1);
302
+ // Remove default margin from `p`
303
+ margin-bottom: 0;
304
+
305
+ &.input-lg,
306
+ &.input-sm {
307
+ padding-right: 0;
308
+ padding-left: 0;
309
+ }
310
+ }
311
+
312
+
313
+ // Form control sizing
314
+ //
315
+ // Build on `.form-control` with modifier classes to decrease or increase the
316
+ // height and font-size of form controls.
317
+ //
318
+ // The `.form-group-* form-control` variations are sadly duplicated to avoid the
319
+ // issue documented in https://github.com/twbs/bootstrap/issues/15074.
320
+
321
+ @include input-size('.input-sm', $input-height-small, $padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $input-border-radius-small);
322
+ .form-group-sm {
323
+ .form-control {
324
+ height: $input-height-small;
325
+ padding: $padding-small-vertical $padding-small-horizontal;
326
+ font-size: $font-size-small;
327
+ line-height: $line-height-small;
328
+ border-radius: $input-border-radius-small;
329
+ }
330
+ select.form-control {
331
+ height: $input-height-small;
332
+ line-height: $input-height-small;
333
+ }
334
+ textarea.form-control,
335
+ select[multiple].form-control {
336
+ height: auto;
337
+ }
338
+ .form-control-static {
339
+ height: $input-height-small;
340
+ min-height: ($line-height-computed + $font-size-small);
341
+ padding: ($padding-small-vertical + 1) $padding-small-horizontal;
342
+ font-size: $font-size-small;
343
+ line-height: $line-height-small;
344
+ }
345
+ }
346
+
347
+ @include input-size('.input-lg', $input-height-large, $padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $input-border-radius-large);
348
+ .form-group-lg {
349
+ .form-control {
350
+ height: $input-height-large;
351
+ padding: $padding-large-vertical $padding-large-horizontal;
352
+ font-size: $font-size-large;
353
+ line-height: $line-height-large;
354
+ border-radius: $input-border-radius-large;
355
+ }
356
+ select.form-control {
357
+ height: $input-height-large;
358
+ line-height: $input-height-large;
359
+ }
360
+ textarea.form-control,
361
+ select[multiple].form-control {
362
+ height: auto;
363
+ }
364
+ .form-control-static {
365
+ height: $input-height-large;
366
+ min-height: ($line-height-computed + $font-size-large);
367
+ padding: ($padding-large-vertical + 1) $padding-large-horizontal;
368
+ font-size: $font-size-large;
369
+ line-height: $line-height-large;
370
+ }
371
+ }
372
+
373
+
374
+ // Form control feedback states
375
+ //
376
+ // Apply contextual and semantic states to individual form controls.
377
+
378
+ .has-feedback {
379
+ // Enable absolute positioning
380
+ position: relative;
381
+
382
+ // Ensure icons don't overlap text
383
+ .form-control {
384
+ padding-right: ($input-height-base * 1.25);
385
+ }
386
+ }
387
+ // Feedback icon (requires .glyphicon classes)
388
+ .form-control-feedback {
389
+ position: absolute;
390
+ top: 0;
391
+ right: 0;
392
+ z-index: 2; // Ensure icon is above input groups
393
+ display: block;
394
+ width: $input-height-base;
395
+ height: $input-height-base;
396
+ line-height: $input-height-base;
397
+ text-align: center;
398
+ pointer-events: none;
399
+ }
400
+ .input-lg + .form-control-feedback,
401
+ .input-group-lg + .form-control-feedback,
402
+ .form-group-lg .form-control + .form-control-feedback {
403
+ width: $input-height-large;
404
+ height: $input-height-large;
405
+ line-height: $input-height-large;
406
+ }
407
+ .input-sm + .form-control-feedback,
408
+ .input-group-sm + .form-control-feedback,
409
+ .form-group-sm .form-control + .form-control-feedback {
410
+ width: $input-height-small;
411
+ height: $input-height-small;
412
+ line-height: $input-height-small;
413
+ }
414
+
415
+ // Feedback states
416
+ .has-success {
417
+ @include form-control-validation($state-success-text, $state-success-text, $state-success-bg);
418
+ }
419
+ .has-warning {
420
+ @include form-control-validation($state-warning-text, $state-warning-text, $state-warning-bg);
421
+ }
422
+ .has-error {
423
+ @include form-control-validation($state-danger-text, $state-danger-text, $state-danger-bg);
424
+ }
425
+
426
+ // Reposition feedback icon if input has visible label above
427
+ .has-feedback label {
428
+
429
+ & ~ .form-control-feedback {
430
+ top: ($line-height-computed + 5); // Height of the `label` and its margin
431
+ }
432
+ &.sr-only ~ .form-control-feedback {
433
+ top: 0;
434
+ }
435
+ }
436
+
437
+
438
+ // Help text
439
+ //
440
+ // Apply to any element you wish to create light text for placement immediately
441
+ // below a form control. Use for general help, formatting, or instructional text.
442
+
443
+ .help-block {
444
+ display: block; // account for any element using help-block
445
+ margin-top: 5px;
446
+ margin-bottom: 10px;
447
+ color: lighten($text-color, 25%); // lighten the text some for contrast
448
+ }
449
+
450
+
451
+ // Inline forms
452
+ //
453
+ // Make forms appear inline(-block) by adding the `.form-inline` class. Inline
454
+ // forms begin stacked on extra small (mobile) devices and then go inline when
455
+ // viewports reach <768px.
456
+ //
457
+ // Requires wrapping inputs and labels with `.form-group` for proper display of
458
+ // default HTML form controls and our custom form controls (e.g., input groups).
459
+ //
460
+ // Heads up! This is mixin-ed into `.navbar-form` in navbars.less.
461
+
462
+ // [converter] extracted from `.form-inline` for libsass compatibility
463
+ @mixin form-inline {
464
+
465
+ // Kick in the inline
466
+ @media (min-width: $screen-sm-min) {
467
+ // Inline-block all the things for "inline"
468
+ .form-group {
469
+ display: inline-block;
470
+ margin-bottom: 0;
471
+ vertical-align: middle;
472
+ }
473
+
474
+ // In navbar-form, allow folks to *not* use `.form-group`
475
+ .form-control {
476
+ display: inline-block;
477
+ width: auto; // Prevent labels from stacking above inputs in `.form-group`
478
+ vertical-align: middle;
479
+ }
480
+
481
+ // Make static controls behave like regular ones
482
+ .form-control-static {
483
+ display: inline-block;
484
+ }
485
+
486
+ .input-group {
487
+ display: inline-table;
488
+ vertical-align: middle;
489
+
490
+ .input-group-addon,
491
+ .input-group-btn,
492
+ .form-control {
493
+ width: auto;
494
+ }
495
+ }
496
+
497
+ // Input groups need that 100% width though
498
+ .input-group > .form-control {
499
+ width: 100%;
500
+ }
501
+
502
+ .control-label {
503
+ margin-bottom: 0;
504
+ vertical-align: middle;
505
+ }
506
+
507
+ // Remove default margin on radios/checkboxes that were used for stacking, and
508
+ // then undo the floating of radios and checkboxes to match.
509
+ .radio,
510
+ .checkbox {
511
+ display: inline-block;
512
+ margin-top: 0;
513
+ margin-bottom: 0;
514
+ vertical-align: middle;
515
+
516
+ label {
517
+ padding-left: 0;
518
+ }
519
+ }
520
+ .radio input[type="radio"],
521
+ .checkbox input[type="checkbox"] {
522
+ position: relative;
523
+ margin-left: 0;
524
+ }
525
+
526
+ // Re-override the feedback icon.
527
+ .has-feedback .form-control-feedback {
528
+ top: 0;
529
+ }
530
+ }
531
+ }
532
+ // [converter] extracted as `@mixin form-inline` for libsass compatibility
533
+ .form-inline {
534
+ @include form-inline;
535
+ }
536
+
537
+
538
+
539
+ // Horizontal forms
540
+ //
541
+ // Horizontal forms are built on grid classes and allow you to create forms with
542
+ // labels on the left and inputs on the right.
543
+
544
+ .form-horizontal {
545
+
546
+ // Consistent vertical alignment of radios and checkboxes
547
+ //
548
+ // Labels also get some reset styles, but that is scoped to a media query below.
549
+ .radio,
550
+ .checkbox,
551
+ .radio-inline,
552
+ .checkbox-inline {
553
+ padding-top: ($padding-base-vertical + 1); // Default padding plus a border
554
+ margin-top: 0;
555
+ margin-bottom: 0;
556
+ }
557
+ // Account for padding we're adding to ensure the alignment and of help text
558
+ // and other content below items
559
+ .radio,
560
+ .checkbox {
561
+ min-height: ($line-height-computed + ($padding-base-vertical + 1));
562
+ }
563
+
564
+ // Make form groups behave like rows
565
+ .form-group {
566
+ @include make-row;
567
+ }
568
+
569
+ // Reset spacing and right align labels, but scope to media queries so that
570
+ // labels on narrow viewports stack the same as a default form example.
571
+ @media (min-width: $screen-sm-min) {
572
+ .control-label {
573
+ padding-top: ($padding-base-vertical + 1); // Default padding plus a border
574
+ margin-bottom: 0;
575
+ text-align: right;
576
+ }
577
+ }
578
+
579
+ // Validation states
580
+ //
581
+ // Reposition the icon because it's now within a grid column and columns have
582
+ // `position: relative;` on them. Also accounts for the grid gutter padding.
583
+ .has-feedback .form-control-feedback {
584
+ right: floor(($grid-gutter-width / 2));
585
+ }
586
+
587
+ // Form group sizes
588
+ //
589
+ // Quick utility class for applying `.input-lg` and `.input-sm` styles to the
590
+ // inputs and labels within a `.form-group`.
591
+ .form-group-lg {
592
+ @media (min-width: $screen-sm-min) {
593
+ .control-label {
594
+ padding-top: ($padding-large-vertical + 1);
595
+ font-size: $font-size-large;
596
+ }
597
+ }
598
+ }
599
+ .form-group-sm {
600
+ @media (min-width: $screen-sm-min) {
601
+ .control-label {
602
+ padding-top: ($padding-small-vertical + 1);
603
+ font-size: $font-size-small;
604
+ }
605
+ }
606
+ }
607
+ }