twitter-bootstrap3-rails 3.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +708 -0
  3. data/Rakefile +46 -0
  4. data/app/assets/fonts/fontawesome-webfont.eot +0 -0
  5. data/app/assets/fonts/fontawesome-webfont.svg +399 -0
  6. data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
  7. data/app/assets/fonts/fontawesome-webfont.woff +0 -0
  8. data/app/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  9. data/app/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  10. data/app/assets/javascripts/twitter/bootstrap.js +12 -0
  11. data/app/assets/javascripts/twitter/bootstrap/affix.js +126 -0
  12. data/app/assets/javascripts/twitter/bootstrap/alert.js +98 -0
  13. data/app/assets/javascripts/twitter/bootstrap/button.js +109 -0
  14. data/app/assets/javascripts/twitter/bootstrap/carousel.js +217 -0
  15. data/app/assets/javascripts/twitter/bootstrap/collapse.js +179 -0
  16. data/app/assets/javascripts/twitter/bootstrap/dropdown.js +154 -0
  17. data/app/assets/javascripts/twitter/bootstrap/modal.js +244 -0
  18. data/app/assets/javascripts/twitter/bootstrap/popover.js +117 -0
  19. data/app/assets/javascripts/twitter/bootstrap/scrollspy.js +158 -0
  20. data/app/assets/javascripts/twitter/bootstrap/tab.js +135 -0
  21. data/app/assets/javascripts/twitter/bootstrap/tooltip.js +382 -0
  22. data/app/assets/javascripts/twitter/bootstrap/transition.js +56 -0
  23. data/app/assets/javascripts/twitter/bootstrap_ujs.js +11 -0
  24. data/app/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +5579 -0
  25. data/app/assets/stylesheets/twitter-bootstrap-static/fontawesome.css.erb +787 -0
  26. data/app/assets/stylesheets/twitter-bootstrap-static/sprites.css.erb +146 -0
  27. data/app/helpers/badge_label_helper.rb +16 -0
  28. data/app/helpers/bootstrap_flash_helper.rb +29 -0
  29. data/app/helpers/flash_block_helper.rb +17 -0
  30. data/app/helpers/glyph_helper.rb +17 -0
  31. data/app/helpers/modal_helper.rb +59 -0
  32. data/app/helpers/navbar_helper.rb +195 -0
  33. data/app/helpers/twitter_breadcrumbs_helper.rb +10 -0
  34. data/app/views/twitter-bootstrap/_breadcrumbs.html.erb +12 -0
  35. data/lib/generators/bootstrap/install/install_generator.rb +82 -0
  36. data/lib/generators/bootstrap/install/templates/application.css +7 -0
  37. data/lib/generators/bootstrap/install/templates/application.js +10 -0
  38. data/lib/generators/bootstrap/install/templates/bootstrap.coffee +3 -0
  39. data/lib/generators/bootstrap/install/templates/bootstrap.js +4 -0
  40. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.css +7 -0
  41. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +29 -0
  42. data/lib/generators/bootstrap/install/templates/en.bootstrap.yml +18 -0
  43. data/lib/generators/bootstrap/layout/layout_generator.rb +20 -0
  44. data/lib/generators/bootstrap/layout/templates/layout.html.erb +85 -0
  45. data/lib/generators/bootstrap/layout/templates/layout.html.haml +50 -0
  46. data/lib/generators/bootstrap/layout/templates/layout.html.slim +52 -0
  47. data/lib/generators/bootstrap/partial/partial_generator.rb +20 -0
  48. data/lib/generators/bootstrap/partial/templates/_login.html.erb +28 -0
  49. data/lib/generators/bootstrap/themed/templates/_form.html.erb +16 -0
  50. data/lib/generators/bootstrap/themed/templates/_form.html.haml +9 -0
  51. data/lib/generators/bootstrap/themed/templates/_form.html.slim +10 -0
  52. data/lib/generators/bootstrap/themed/templates/edit.html.erb +5 -0
  53. data/lib/generators/bootstrap/themed/templates/edit.html.haml +4 -0
  54. data/lib/generators/bootstrap/themed/templates/edit.html.slim +4 -0
  55. data/lib/generators/bootstrap/themed/templates/index.html.erb +40 -0
  56. data/lib/generators/bootstrap/themed/templates/index.html.haml +25 -0
  57. data/lib/generators/bootstrap/themed/templates/index.html.slim +27 -0
  58. data/lib/generators/bootstrap/themed/templates/new.html.erb +5 -0
  59. data/lib/generators/bootstrap/themed/templates/new.html.haml +4 -0
  60. data/lib/generators/bootstrap/themed/templates/new.html.slim +4 -0
  61. data/lib/generators/bootstrap/themed/templates/show.html.erb +21 -0
  62. data/lib/generators/bootstrap/themed/templates/show.html.haml +15 -0
  63. data/lib/generators/bootstrap/themed/templates/show.html.slim +16 -0
  64. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.erb +13 -0
  65. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.haml +10 -0
  66. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.slim +11 -0
  67. data/lib/generators/bootstrap/themed/themed_generator.rb +148 -0
  68. data/lib/twitter-bootstrap-rails.rb +10 -0
  69. data/lib/twitter/bootstrap/rails/bootstrap.rb +2 -0
  70. data/lib/twitter/bootstrap/rails/engine.rb +33 -0
  71. data/lib/twitter/bootstrap/rails/twitter-bootstrap-breadcrumbs.rb +42 -0
  72. data/lib/twitter/bootstrap/rails/version.rb +7 -0
  73. data/spec/lib/twitter_bootstrap_rails/badge_label_helper_spec.rb +22 -0
  74. data/spec/lib/twitter_bootstrap_rails/modal_helper_spec.rb +62 -0
  75. data/spec/lib/twitter_bootstrap_rails/navbar_helper_spec.rb +331 -0
  76. data/spec/lib/twitter_bootstrap_rails/uri_state_spec.rb +47 -0
  77. data/spec/spec_helper.rb +11 -0
  78. data/test/lib/breadcrumbs_test.rb +75 -0
  79. data/test/test_helper.rb +11 -0
  80. data/vendor/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +5579 -0
  81. data/vendor/static-source/bootstrap.less +1 -0
  82. data/vendor/static-source/fontawesome.less +9 -0
  83. data/vendor/static-source/sprites.less +6 -0
  84. data/vendor/toolkit/fontawesome/bootstrap.less +84 -0
  85. data/vendor/toolkit/fontawesome/core.less +129 -0
  86. data/vendor/toolkit/fontawesome/extras.less +93 -0
  87. data/vendor/toolkit/fontawesome/font-awesome-ie7.less +1953 -0
  88. data/vendor/toolkit/fontawesome/font-awesome.less +33 -0
  89. data/vendor/toolkit/fontawesome/icons.less +381 -0
  90. data/vendor/toolkit/fontawesome/mixins.less +48 -0
  91. data/vendor/toolkit/fontawesome/path.less +14 -0
  92. data/vendor/toolkit/fontawesome/variables.less +735 -0
  93. data/vendor/toolkit/twitter/bootstrap/alerts.less +71 -0
  94. data/vendor/toolkit/twitter/bootstrap/badges.less +51 -0
  95. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +63 -0
  96. data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +23 -0
  97. data/vendor/toolkit/twitter/bootstrap/button-groups.less +244 -0
  98. data/vendor/toolkit/twitter/bootstrap/buttons.less +159 -0
  99. data/vendor/toolkit/twitter/bootstrap/carousel.less +204 -0
  100. data/vendor/toolkit/twitter/bootstrap/close.less +33 -0
  101. data/vendor/toolkit/twitter/bootstrap/code.less +56 -0
  102. data/vendor/toolkit/twitter/bootstrap/component-animations.less +29 -0
  103. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +176 -0
  104. data/vendor/toolkit/twitter/bootstrap/forms.less +332 -0
  105. data/vendor/toolkit/twitter/bootstrap/grid.less +340 -0
  106. data/vendor/toolkit/twitter/bootstrap/input-groups.less +127 -0
  107. data/vendor/toolkit/twitter/bootstrap/jumbotron.less +29 -0
  108. data/vendor/toolkit/twitter/bootstrap/labels.less +54 -0
  109. data/vendor/toolkit/twitter/bootstrap/list-group.less +88 -0
  110. data/vendor/toolkit/twitter/bootstrap/media.less +56 -0
  111. data/vendor/toolkit/twitter/bootstrap/mixins.less +693 -0
  112. data/vendor/toolkit/twitter/bootstrap/modals.less +133 -0
  113. data/vendor/toolkit/twitter/bootstrap/navbar.less +559 -0
  114. data/vendor/toolkit/twitter/bootstrap/navs.less +228 -0
  115. data/vendor/toolkit/twitter/bootstrap/normalize.less +396 -0
  116. data/vendor/toolkit/twitter/bootstrap/pager.less +55 -0
  117. data/vendor/toolkit/twitter/bootstrap/pagination.less +72 -0
  118. data/vendor/toolkit/twitter/bootstrap/panels.less +128 -0
  119. data/vendor/toolkit/twitter/bootstrap/popovers.less +133 -0
  120. data/vendor/toolkit/twitter/bootstrap/print.less +100 -0
  121. data/vendor/toolkit/twitter/bootstrap/progress-bars.less +99 -0
  122. data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +149 -0
  123. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +111 -0
  124. data/vendor/toolkit/twitter/bootstrap/tables.less +211 -0
  125. data/vendor/toolkit/twitter/bootstrap/thumbnails.less +42 -0
  126. data/vendor/toolkit/twitter/bootstrap/tooltip.less +95 -0
  127. data/vendor/toolkit/twitter/bootstrap/type.less +238 -0
  128. data/vendor/toolkit/twitter/bootstrap/utilities.less +42 -0
  129. data/vendor/toolkit/twitter/bootstrap/variables.less +607 -0
  130. data/vendor/toolkit/twitter/bootstrap/wells.less +29 -0
  131. data/vendor/toolkit/twitter/bootstrap_base.less +2 -0
  132. metadata +297 -0
@@ -0,0 +1,29 @@
1
+ //
2
+ // Component animations
3
+ // --------------------------------------------------
4
+
5
+ // Heads up!
6
+ //
7
+ // We don't use the `.opacity()` mixin here since it causes a bug with text
8
+ // fields in IE7-8. Source: https://github.com/twitter/bootstrap/pull/3552.
9
+
10
+ .fade {
11
+ opacity: 0;
12
+ .transition(opacity .15s linear);
13
+ &.in {
14
+ opacity: 1;
15
+ }
16
+ }
17
+
18
+ .collapse {
19
+ display: none;
20
+ &.in {
21
+ display: block;
22
+ }
23
+ }
24
+ .collapsing {
25
+ position: relative;
26
+ height: 0;
27
+ overflow: hidden;
28
+ .transition(height .35s ease);
29
+ }
@@ -0,0 +1,176 @@
1
+ //
2
+ // Dropdown menus
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Dropdown arrow/caret
7
+ .caret {
8
+ display: inline-block;
9
+ width: 0;
10
+ height: 0;
11
+ margin-left: 2px;
12
+ vertical-align: middle;
13
+ border-top: @caret-width-base solid @dropdown-caret-color;
14
+ border-right: @caret-width-base solid transparent;
15
+ border-left: @caret-width-base solid transparent;
16
+ content: "";
17
+ }
18
+
19
+ // The dropdown wrapper (div)
20
+ .dropdown {
21
+ position: relative;
22
+ }
23
+
24
+ // Prevent the focus on the dropdown toggle when closing dropdowns
25
+ .dropdown-toggle:focus {
26
+ outline: 0;
27
+ }
28
+
29
+ // The dropdown menu (ul)
30
+ .dropdown-menu {
31
+ position: absolute;
32
+ top: 100%;
33
+ left: 0;
34
+ z-index: @zindex-dropdown;
35
+ display: none; // none by default, but block on "open" of the menu
36
+ float: left;
37
+ min-width: 160px;
38
+ padding: 5px 0;
39
+ margin: 2px 0 0; // override default ul
40
+ list-style: none;
41
+ font-size: @font-size-base;
42
+ background-color: @dropdown-bg;
43
+ border: 1px solid @dropdown-fallback-border; // IE8 fallback
44
+ border: 1px solid @dropdown-border;
45
+ border-radius: @border-radius-base;
46
+ .box-shadow(0 6px 12px rgba(0,0,0,.175));
47
+ background-clip: padding-box;
48
+
49
+ // Aligns the dropdown menu to right
50
+ &.pull-right {
51
+ right: 0;
52
+ left: auto;
53
+ }
54
+
55
+ // Dividers (basically an hr) within the dropdown
56
+ .divider {
57
+ .nav-divider(@dropdown-divider-bg);
58
+ }
59
+
60
+ // Links within the dropdown menu
61
+ > li > a {
62
+ display: block;
63
+ padding: 3px 20px;
64
+ clear: both;
65
+ font-weight: normal;
66
+ line-height: @line-height-base;
67
+ color: @dropdown-link-color;
68
+ white-space: nowrap; // prevent links from randomly breaking onto new lines
69
+ }
70
+ }
71
+
72
+ // Hover/Focus state
73
+ .dropdown-menu > li > a {
74
+ &:hover,
75
+ &:focus {
76
+ text-decoration: none;
77
+ color: @dropdown-link-hover-color;
78
+ #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));
79
+ background-color: darken(@dropdown-link-hover-bg, 5%);
80
+ }
81
+ }
82
+
83
+ // Active state
84
+ .dropdown-menu > .active > a {
85
+ &,
86
+ &:hover,
87
+ &:focus {
88
+ color: @dropdown-link-active-color;
89
+ text-decoration: none;
90
+ outline: 0;
91
+ #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));
92
+ background-color: darken(@dropdown-link-active-bg, 5%);
93
+ }
94
+ }
95
+
96
+ // Disabled state
97
+ //
98
+ // Gray out text and ensure the hover/focus state remains gray
99
+
100
+ .dropdown-menu > .disabled > a {
101
+ &,
102
+ &:hover,
103
+ &:focus {
104
+ color: @dropdown-link-disabled-color;
105
+ }
106
+ }
107
+ // Nuke hover/focus effects
108
+ .dropdown-menu > .disabled > a {
109
+ &:hover,
110
+ &:focus {
111
+ text-decoration: none;
112
+ background-color: transparent;
113
+ background-image: none; // Remove CSS gradient
114
+ .reset-filter();
115
+ cursor: not-allowed;
116
+ }
117
+ }
118
+
119
+ // Open state for the dropdown
120
+ .open {
121
+ // Show the menu
122
+ > .dropdown-menu {
123
+ display: block;
124
+ }
125
+
126
+ // Remove the outline when :focus is triggered
127
+ > a {
128
+ outline: 0;
129
+ }
130
+ }
131
+
132
+ // Dropdown section headers
133
+ .dropdown-header {
134
+ display: block;
135
+ padding: 3px 20px;
136
+ font-size: @font-size-small;
137
+ line-height: @line-height-base;
138
+ color: @dropdown-header-color;
139
+ }
140
+
141
+ // Backdrop to catch body clicks on mobile, etc.
142
+ .dropdown-backdrop {
143
+ position: fixed;
144
+ left: 0;
145
+ right: 0;
146
+ bottom: 0;
147
+ top: 0;
148
+ z-index: @zindex-dropdown - 10;
149
+ }
150
+
151
+ // Right aligned dropdowns
152
+ .pull-right > .dropdown-menu {
153
+ right: 0;
154
+ left: auto;
155
+ }
156
+
157
+ // Allow for dropdowns to go bottom up (aka, dropup-menu)
158
+ //
159
+ // Just add .dropup after the standard .dropdown class and you're set, bro.
160
+ // TODO: abstract this so that the navbar fixed styles are not placed here?
161
+
162
+ .dropup,
163
+ .navbar-fixed-bottom .dropdown {
164
+ // Reverse the caret
165
+ .caret {
166
+ border-top: 0;
167
+ border-bottom: 4px solid @dropdown-caret-color;
168
+ content: "";
169
+ }
170
+ // Different positioning for bottom up menu
171
+ .dropdown-menu {
172
+ top: auto;
173
+ bottom: 100%;
174
+ margin-bottom: 1px;
175
+ }
176
+ }
@@ -0,0 +1,332 @@
1
+ //
2
+ // Forms
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Normalize non-controls
7
+ //
8
+ // Restyle and baseline non-control form elements.
9
+
10
+ fieldset {
11
+ padding: 0;
12
+ margin: 0;
13
+ border: 0;
14
+ }
15
+
16
+ legend {
17
+ display: block;
18
+ width: 100%;
19
+ padding: 0;
20
+ margin-bottom: @line-height-computed;
21
+ font-size: (@font-size-base * 1.5);
22
+ line-height: inherit;
23
+ color: @legend-color;
24
+ border: 0;
25
+ border-bottom: 1px solid @legend-border-color;
26
+ }
27
+
28
+ label {
29
+ display: inline-block;
30
+ margin-bottom: 5px;
31
+ font-weight: bold;
32
+ }
33
+
34
+
35
+ // Normalize form controls
36
+
37
+ // Override content-box in Normalize (* isn't specific enough)
38
+ input[type="search"] {
39
+ .box-sizing(border-box);
40
+ }
41
+
42
+ // Position radios and checkboxes better
43
+ input[type="radio"],
44
+ input[type="checkbox"] {
45
+ margin: 4px 0 0;
46
+ margin-top: 1px \9; /* IE8-9 */
47
+ line-height: normal;
48
+ }
49
+
50
+ // Set the height of select and file controls to match text inputs
51
+ input[type="file"] {
52
+ display: block;
53
+ }
54
+
55
+ // Make multiple select elements height not fixed
56
+ select[multiple],
57
+ select[size] {
58
+ height: auto;
59
+ }
60
+
61
+ // Fix optgroup Firefox bug per https://github.com/twbs/bootstrap/issues/7611
62
+ select optgroup {
63
+ font-size: inherit;
64
+ font-style: inherit;
65
+ font-family: inherit;
66
+ }
67
+
68
+ // Focus for select, file, radio, and checkbox
69
+ input[type="file"]:focus,
70
+ input[type="radio"]:focus,
71
+ input[type="checkbox"]:focus {
72
+ .tab-focus();
73
+ }
74
+
75
+ // Fix for Chrome number input
76
+ // Setting certain font-sizes causes the `I` bar to appear on hover of the bottom increment button.
77
+ // See https://github.com/twbs/bootstrap/issues/8350 for more.
78
+ input[type="number"] {
79
+ &::-webkit-outer-spin-button,
80
+ &::-webkit-inner-spin-button {
81
+ height: auto;
82
+ }
83
+ }
84
+
85
+
86
+ // Placeholder
87
+ //
88
+ // Placeholder text gets special styles because when browsers invalidate entire
89
+ // lines if it doesn't understand a selector/
90
+ .form-control {
91
+ .placeholder();
92
+ }
93
+
94
+
95
+ // Common form controls
96
+ //
97
+ // Shared size and type resets for form controls. Apply `.form-control` to any
98
+ // of the following form controls:
99
+ //
100
+ // select
101
+ // textarea
102
+ // input[type="text"]
103
+ // input[type="password"]
104
+ // input[type="datetime"]
105
+ // input[type="datetime-local"]
106
+ // input[type="date"]
107
+ // input[type="month"]
108
+ // input[type="time"]
109
+ // input[type="week"]
110
+ // input[type="number"]
111
+ // input[type="email"]
112
+ // input[type="url"]
113
+ // input[type="search"]
114
+ // input[type="tel"]
115
+ // input[type="color"]
116
+
117
+ .form-control {
118
+ display: block;
119
+ width: 100%;
120
+ height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
121
+ padding: @padding-base-vertical @padding-base-horizontal;
122
+ font-size: @font-size-base;
123
+ line-height: @line-height-base;
124
+ color: @input-color;
125
+ vertical-align: middle;
126
+ background-color: @input-bg;
127
+ border: 1px solid @input-border;
128
+ border-radius: @input-border-radius;
129
+ .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
130
+ .transition(~"border-color ease-in-out .15s, box-shadow ease-in-out .15s");
131
+
132
+ // Customize the `:focus` state to imitate native WebKit styles.
133
+ .form-control-focus();
134
+
135
+ // Disabled and read-only inputs
136
+ // Note: HTML5 says that inputs under a fieldset > legend:first-child won't be
137
+ // disabled if the fieldset is disabled. Due to implementation difficulty,
138
+ // we don't honor that edge case; we style them as disabled anyway.
139
+ &[disabled],
140
+ &[readonly],
141
+ fieldset[disabled] & {
142
+ cursor: not-allowed;
143
+ background-color: @input-bg-disabled;
144
+ }
145
+
146
+ // Reset height for `textarea`s
147
+ textarea& {
148
+ height: auto;
149
+ }
150
+ }
151
+
152
+
153
+ // Form groups
154
+ //
155
+ // Designed to help with the organization and spacing of vertical forms. For
156
+ // horizontal forms, use the predefined grid classes.
157
+
158
+ .form-group {
159
+ margin-bottom: 15px;
160
+ }
161
+
162
+
163
+ // Checkboxes and radios
164
+ //
165
+ // Indent the labels to position radios/checkboxes as hanging controls.
166
+
167
+ .radio,
168
+ .checkbox {
169
+ display: block;
170
+ min-height: @line-height-computed; // clear the floating input if there is no label text
171
+ margin-top: 10px;
172
+ margin-bottom: 10px;
173
+ padding-left: 20px;
174
+ vertical-align: middle;
175
+ label {
176
+ display: inline;
177
+ margin-bottom: 0;
178
+ font-weight: normal;
179
+ cursor: pointer;
180
+ }
181
+ }
182
+ .radio input[type="radio"],
183
+ .radio-inline input[type="radio"],
184
+ .checkbox input[type="checkbox"],
185
+ .checkbox-inline input[type="checkbox"] {
186
+ float: left;
187
+ margin-left: -20px;
188
+ }
189
+ .radio + .radio,
190
+ .checkbox + .checkbox {
191
+ margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing
192
+ }
193
+
194
+ // Radios and checkboxes on same line
195
+ .radio-inline,
196
+ .checkbox-inline {
197
+ display: inline-block;
198
+ padding-left: 20px;
199
+ margin-bottom: 0;
200
+ vertical-align: middle;
201
+ font-weight: normal;
202
+ cursor: pointer;
203
+ }
204
+ .radio-inline + .radio-inline,
205
+ .checkbox-inline + .checkbox-inline {
206
+ margin-top: 0;
207
+ margin-left: 10px; // space out consecutive inline controls
208
+ }
209
+
210
+
211
+ // Form control sizing
212
+ .input-sm {
213
+ .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
214
+ }
215
+
216
+ .input-lg {
217
+ .input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
218
+ }
219
+
220
+
221
+ // Form control feedback states
222
+ //
223
+ // Apply contextual and semantic states to individual form controls.
224
+
225
+ // Warning
226
+ .has-warning {
227
+ .form-control-validation(@state-warning-text; @state-warning-text; @state-warning-bg);
228
+ }
229
+ // Error
230
+ .has-error {
231
+ .form-control-validation(@state-danger-text; @state-danger-text; @state-danger-bg);
232
+ }
233
+ // Success
234
+ .has-success {
235
+ .form-control-validation(@state-success-text; @state-success-text; @state-success-bg);
236
+ }
237
+
238
+
239
+ // Static form control text
240
+ //
241
+ // Apply class to a `p` element to make any string of text align with labels in
242
+ // a horizontal form layout.
243
+
244
+ .form-control-static {
245
+ margin-bottom: 0; // Remove default margin from `p`
246
+ padding-top: @padding-base-vertical;
247
+ }
248
+
249
+
250
+ // Help text
251
+ //
252
+ // Apply to any element you wish to create light text for placement immediately
253
+ // below a form control. Use for general help, formatting, or instructional text.
254
+
255
+ .help-block {
256
+ display: block; // account for any element using help-block
257
+ margin-top: 5px;
258
+ margin-bottom: 10px;
259
+ color: lighten(@text-color, 25%); // lighten the text some for contrast
260
+ }
261
+
262
+
263
+
264
+ // Inline forms
265
+ //
266
+ // Make forms appear inline(-block) by adding the `.form-inline` class. Inline
267
+ // forms begin stacked on extra small (mobile) devices and then go inline when
268
+ // viewports reach <768px.
269
+ //
270
+ // Requires wrapping inputs and labels with `.form-group` for proper display of
271
+ // default HTML form controls and our custom form controls (e.g., input groups).
272
+ //
273
+ // Heads up! This is mixin-ed into `.navbar-form` in navbars.less.
274
+
275
+ .form-inline {
276
+
277
+ // Kick in the inline
278
+ @media (min-width: @screen-tablet) {
279
+ // Inline-block all the things for "inline"
280
+ .form-group {
281
+ display: inline-block;
282
+ margin-bottom: 0;
283
+ vertical-align: middle;
284
+ }
285
+
286
+ // In navbar-form, allow folks to *not* use `.form-group`
287
+ .form-control {
288
+ display: inline-block;
289
+ }
290
+
291
+ // Remove default margin on radios/checkboxes that were used for stacking, and
292
+ // then undo the floating of radios and checkboxes to match (which also avoids
293
+ // a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969).
294
+ .radio,
295
+ .checkbox {
296
+ display: inline-block;
297
+ margin-top: 0;
298
+ margin-bottom: 0;
299
+ padding-left: 0;
300
+ }
301
+ .radio input[type="radio"],
302
+ .checkbox input[type="checkbox"] {
303
+ float: none;
304
+ margin-left: 0;
305
+ }
306
+ }
307
+ }
308
+
309
+
310
+ // Horizontal forms
311
+ //
312
+ // Horizontal forms are built on grid classes and allow you to create forms with
313
+ // labels on the left and inputs on the right.
314
+
315
+ .form-horizontal .control-label,
316
+ .form-horizontal .radio-inline,
317
+ .form-horizontal .checkbox-inline {
318
+ padding-top: @padding-base-vertical;
319
+ }
320
+
321
+ .form-horizontal {
322
+ .form-group {
323
+ .make-row();
324
+ }
325
+ }
326
+
327
+ // Only right align form labels here when the columns stop stacking
328
+ @media (min-width: @screen-tablet) {
329
+ .form-horizontal .control-label {
330
+ text-align: right;
331
+ }
332
+ }