kanpachi 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/bower.json +1 -0
  4. data/kanpachi.gemspec +1 -1
  5. data/lib/kanpachi/doc/template/components/bootstrap/.bower.json +34 -0
  6. data/lib/kanpachi/doc/template/components/bootstrap/Gruntfile.js +421 -0
  7. data/lib/kanpachi/doc/template/components/bootstrap/LICENSE +21 -0
  8. data/lib/kanpachi/doc/template/components/bootstrap/README.md +173 -0
  9. data/lib/kanpachi/doc/template/components/bootstrap/bower.json +24 -0
  10. data/lib/kanpachi/doc/template/{source/stylesheets → components/bootstrap/dist/css}/bootstrap-theme.css +0 -0
  11. data/lib/kanpachi/doc/template/{source/stylesheets → components/bootstrap/dist/css}/bootstrap-theme.css.map +0 -0
  12. data/lib/kanpachi/doc/template/{source/stylesheets → components/bootstrap/dist/css}/bootstrap-theme.min.css +0 -0
  13. data/lib/kanpachi/doc/template/{source/stylesheets → components/bootstrap/dist/css}/bootstrap.css +0 -0
  14. data/lib/kanpachi/doc/template/{source/stylesheets → components/bootstrap/dist/css}/bootstrap.css.map +0 -0
  15. data/lib/kanpachi/doc/template/{source/stylesheets → components/bootstrap/dist/css}/bootstrap.min.css +0 -0
  16. data/lib/kanpachi/doc/template/components/bootstrap/dist/fonts/glyphicons-halflings-regular.eot +0 -0
  17. data/lib/kanpachi/doc/template/components/bootstrap/dist/fonts/glyphicons-halflings-regular.svg +229 -0
  18. data/lib/kanpachi/doc/template/components/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
  19. data/lib/kanpachi/doc/template/components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff +0 -0
  20. data/lib/kanpachi/doc/template/{source/javascripts → components/bootstrap/dist/js}/bootstrap.js +0 -0
  21. data/lib/kanpachi/doc/template/{source/javascripts → components/bootstrap/dist/js}/bootstrap.min.js +0 -0
  22. data/lib/kanpachi/doc/template/components/bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
  23. data/lib/kanpachi/doc/template/components/bootstrap/fonts/glyphicons-halflings-regular.svg +229 -0
  24. data/lib/kanpachi/doc/template/components/bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
  25. data/lib/kanpachi/doc/template/components/bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
  26. data/lib/kanpachi/doc/template/components/bootstrap/grunt/bs-glyphicons-data-generator.js +34 -0
  27. data/lib/kanpachi/doc/template/components/bootstrap/grunt/bs-lessdoc-parser.js +236 -0
  28. data/lib/kanpachi/doc/template/components/bootstrap/grunt/bs-raw-files-generator.js +31 -0
  29. data/lib/kanpachi/doc/template/components/bootstrap/grunt/shrinkwrap.js +28 -0
  30. data/lib/kanpachi/doc/template/components/bootstrap/js/affix.js +137 -0
  31. data/lib/kanpachi/doc/template/components/bootstrap/js/alert.js +88 -0
  32. data/lib/kanpachi/doc/template/components/bootstrap/js/button.js +107 -0
  33. data/lib/kanpachi/doc/template/components/bootstrap/js/carousel.js +205 -0
  34. data/lib/kanpachi/doc/template/components/bootstrap/js/collapse.js +170 -0
  35. data/lib/kanpachi/doc/template/components/bootstrap/js/dropdown.js +147 -0
  36. data/lib/kanpachi/doc/template/components/bootstrap/js/modal.js +243 -0
  37. data/lib/kanpachi/doc/template/components/bootstrap/js/popover.js +110 -0
  38. data/lib/kanpachi/doc/template/components/bootstrap/js/scrollspy.js +153 -0
  39. data/lib/kanpachi/doc/template/components/bootstrap/js/tab.js +125 -0
  40. data/lib/kanpachi/doc/template/components/bootstrap/js/tooltip.js +399 -0
  41. data/lib/kanpachi/doc/template/components/bootstrap/js/transition.js +48 -0
  42. data/lib/kanpachi/doc/template/components/bootstrap/less/alerts.less +67 -0
  43. data/lib/kanpachi/doc/template/components/bootstrap/less/badges.less +55 -0
  44. data/lib/kanpachi/doc/template/components/bootstrap/less/bootstrap.less +49 -0
  45. data/lib/kanpachi/doc/template/components/bootstrap/less/breadcrumbs.less +26 -0
  46. data/lib/kanpachi/doc/template/components/bootstrap/less/button-groups.less +226 -0
  47. data/lib/kanpachi/doc/template/components/bootstrap/less/buttons.less +159 -0
  48. data/lib/kanpachi/doc/template/components/bootstrap/less/carousel.less +232 -0
  49. data/lib/kanpachi/doc/template/components/bootstrap/less/close.less +33 -0
  50. data/lib/kanpachi/doc/template/components/bootstrap/less/code.less +63 -0
  51. data/lib/kanpachi/doc/template/components/bootstrap/less/component-animations.less +29 -0
  52. data/lib/kanpachi/doc/template/components/bootstrap/less/dropdowns.less +213 -0
  53. data/lib/kanpachi/doc/template/components/bootstrap/less/forms.less +438 -0
  54. data/lib/kanpachi/doc/template/components/bootstrap/less/glyphicons.less +233 -0
  55. data/lib/kanpachi/doc/template/components/bootstrap/less/grid.less +84 -0
  56. data/lib/kanpachi/doc/template/components/bootstrap/less/input-groups.less +162 -0
  57. data/lib/kanpachi/doc/template/components/bootstrap/less/jumbotron.less +44 -0
  58. data/lib/kanpachi/doc/template/components/bootstrap/less/labels.less +64 -0
  59. data/lib/kanpachi/doc/template/components/bootstrap/less/list-group.less +110 -0
  60. data/lib/kanpachi/doc/template/components/bootstrap/less/media.less +56 -0
  61. data/lib/kanpachi/doc/template/components/bootstrap/less/mixins.less +929 -0
  62. data/lib/kanpachi/doc/template/components/bootstrap/less/modals.less +139 -0
  63. data/lib/kanpachi/doc/template/components/bootstrap/less/navbar.less +616 -0
  64. data/lib/kanpachi/doc/template/components/bootstrap/less/navs.less +242 -0
  65. data/lib/kanpachi/doc/template/components/bootstrap/less/normalize.less +423 -0
  66. data/lib/kanpachi/doc/template/components/bootstrap/less/pager.less +55 -0
  67. data/lib/kanpachi/doc/template/components/bootstrap/less/pagination.less +88 -0
  68. data/lib/kanpachi/doc/template/components/bootstrap/less/panels.less +241 -0
  69. data/lib/kanpachi/doc/template/components/bootstrap/less/popovers.less +133 -0
  70. data/lib/kanpachi/doc/template/components/bootstrap/less/print.less +101 -0
  71. data/lib/kanpachi/doc/template/components/bootstrap/less/progress-bars.less +80 -0
  72. data/lib/kanpachi/doc/template/components/bootstrap/less/responsive-utilities.less +92 -0
  73. data/lib/kanpachi/doc/template/components/bootstrap/less/scaffolding.less +134 -0
  74. data/lib/kanpachi/doc/template/components/bootstrap/less/tables.less +233 -0
  75. data/lib/kanpachi/doc/template/components/bootstrap/less/theme.less +247 -0
  76. data/lib/kanpachi/doc/template/components/bootstrap/less/thumbnails.less +36 -0
  77. data/lib/kanpachi/doc/template/components/bootstrap/less/tooltip.less +95 -0
  78. data/lib/kanpachi/doc/template/components/bootstrap/less/type.less +293 -0
  79. data/lib/kanpachi/doc/template/components/bootstrap/less/utilities.less +56 -0
  80. data/lib/kanpachi/doc/template/components/bootstrap/less/variables.less +829 -0
  81. data/lib/kanpachi/doc/template/components/bootstrap/less/wells.less +29 -0
  82. data/lib/kanpachi/doc/template/components/bootstrap/package.json +70 -0
  83. data/lib/kanpachi/doc/template/components/bootstrap/test-infra/README.md +100 -0
  84. data/lib/kanpachi/doc/template/components/bootstrap/test-infra/npm-shrinkwrap.canonical.json +1 -0
  85. data/lib/kanpachi/doc/template/components/bootstrap/test-infra/requirements.txt +1 -0
  86. data/lib/kanpachi/doc/template/components/bootstrap/test-infra/s3_cache.py +107 -0
  87. data/lib/kanpachi/doc/template/components/bootstrap/test-infra/sauce_browsers.yml +83 -0
  88. data/lib/kanpachi/doc/template/components/bootstrap/test-infra/uncached-npm-install.sh +4 -0
  89. data/lib/kanpachi/doc/template/components/html5shiv/.bower.json +6 -7
  90. data/lib/kanpachi/doc/template/components/html5shiv/Gruntfile.js +61 -0
  91. data/lib/kanpachi/doc/template/components/html5shiv/bower.json +15 -0
  92. data/lib/kanpachi/doc/template/components/html5shiv/dist/html5shiv-printshiv.js +498 -10
  93. data/lib/kanpachi/doc/template/components/html5shiv/dist/html5shiv-printshiv.min.js +4 -0
  94. data/lib/kanpachi/doc/template/components/html5shiv/dist/html5shiv.js +300 -7
  95. data/lib/kanpachi/doc/template/components/html5shiv/dist/html5shiv.min.js +4 -0
  96. data/lib/kanpachi/doc/template/components/html5shiv/package.json +16 -0
  97. data/lib/kanpachi/doc/template/components/html5shiv/readme.md +3 -3
  98. data/lib/kanpachi/doc/template/source/javascripts/all.coffee +1 -1
  99. data/lib/kanpachi/doc/template/source/layouts/layout.slim +1 -1
  100. data/lib/kanpachi/response.rb +13 -5
  101. data/lib/kanpachi/version.rb +1 -1
  102. metadata +93 -12
@@ -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,213 @@
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;
14
+ border-right: @caret-width-base solid transparent;
15
+ border-left: @caret-width-base solid transparent;
16
+ }
17
+
18
+ // The dropdown wrapper (div)
19
+ .dropdown {
20
+ position: relative;
21
+ }
22
+
23
+ // Prevent the focus on the dropdown toggle when closing dropdowns
24
+ .dropdown-toggle:focus {
25
+ outline: 0;
26
+ }
27
+
28
+ // The dropdown menu (ul)
29
+ .dropdown-menu {
30
+ position: absolute;
31
+ top: 100%;
32
+ left: 0;
33
+ z-index: @zindex-dropdown;
34
+ display: none; // none by default, but block on "open" of the menu
35
+ float: left;
36
+ min-width: 160px;
37
+ padding: 5px 0;
38
+ margin: 2px 0 0; // override default ul
39
+ list-style: none;
40
+ font-size: @font-size-base;
41
+ background-color: @dropdown-bg;
42
+ border: 1px solid @dropdown-fallback-border; // IE8 fallback
43
+ border: 1px solid @dropdown-border;
44
+ border-radius: @border-radius-base;
45
+ .box-shadow(0 6px 12px rgba(0,0,0,.175));
46
+ background-clip: padding-box;
47
+
48
+ // Aligns the dropdown menu to right
49
+ //
50
+ // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`
51
+ &.pull-right {
52
+ right: 0;
53
+ left: auto;
54
+ }
55
+
56
+ // Dividers (basically an hr) within the dropdown
57
+ .divider {
58
+ .nav-divider(@dropdown-divider-bg);
59
+ }
60
+
61
+ // Links within the dropdown menu
62
+ > li > a {
63
+ display: block;
64
+ padding: 3px 20px;
65
+ clear: both;
66
+ font-weight: normal;
67
+ line-height: @line-height-base;
68
+ color: @dropdown-link-color;
69
+ white-space: nowrap; // prevent links from randomly breaking onto new lines
70
+ }
71
+ }
72
+
73
+ // Hover/Focus state
74
+ .dropdown-menu > li > a {
75
+ &:hover,
76
+ &:focus {
77
+ text-decoration: none;
78
+ color: @dropdown-link-hover-color;
79
+ background-color: @dropdown-link-hover-bg;
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
+ background-color: @dropdown-link-active-bg;
92
+ }
93
+ }
94
+
95
+ // Disabled state
96
+ //
97
+ // Gray out text and ensure the hover/focus state remains gray
98
+
99
+ .dropdown-menu > .disabled > a {
100
+ &,
101
+ &:hover,
102
+ &:focus {
103
+ color: @dropdown-link-disabled-color;
104
+ }
105
+ }
106
+ // Nuke hover/focus effects
107
+ .dropdown-menu > .disabled > a {
108
+ &:hover,
109
+ &:focus {
110
+ text-decoration: none;
111
+ background-color: transparent;
112
+ background-image: none; // Remove CSS gradient
113
+ .reset-filter();
114
+ cursor: not-allowed;
115
+ }
116
+ }
117
+
118
+ // Open state for the dropdown
119
+ .open {
120
+ // Show the menu
121
+ > .dropdown-menu {
122
+ display: block;
123
+ }
124
+
125
+ // Remove the outline when :focus is triggered
126
+ > a {
127
+ outline: 0;
128
+ }
129
+ }
130
+
131
+ // Menu positioning
132
+ //
133
+ // Add extra class to `.dropdown-menu` to flip the alignment of the dropdown
134
+ // menu with the parent.
135
+ .dropdown-menu-right {
136
+ left: auto; // Reset the default from `.dropdown-menu`
137
+ right: 0;
138
+ }
139
+ // With v3, we enabled auto-flipping if you have a dropdown within a right
140
+ // aligned nav component. To enable the undoing of that, we provide an override
141
+ // to restore the default dropdown menu alignment.
142
+ //
143
+ // This is only for left-aligning a dropdown menu within a `.navbar-right` or
144
+ // `.pull-right` nav component.
145
+ .dropdown-menu-left {
146
+ left: 0;
147
+ right: auto;
148
+ }
149
+
150
+ // Dropdown section headers
151
+ .dropdown-header {
152
+ display: block;
153
+ padding: 3px 20px;
154
+ font-size: @font-size-small;
155
+ line-height: @line-height-base;
156
+ color: @dropdown-header-color;
157
+ }
158
+
159
+ // Backdrop to catch body clicks on mobile, etc.
160
+ .dropdown-backdrop {
161
+ position: fixed;
162
+ left: 0;
163
+ right: 0;
164
+ bottom: 0;
165
+ top: 0;
166
+ z-index: (@zindex-dropdown - 10);
167
+ }
168
+
169
+ // Right aligned dropdowns
170
+ .pull-right > .dropdown-menu {
171
+ right: 0;
172
+ left: auto;
173
+ }
174
+
175
+ // Allow for dropdowns to go bottom up (aka, dropup-menu)
176
+ //
177
+ // Just add .dropup after the standard .dropdown class and you're set, bro.
178
+ // TODO: abstract this so that the navbar fixed styles are not placed here?
179
+
180
+ .dropup,
181
+ .navbar-fixed-bottom .dropdown {
182
+ // Reverse the caret
183
+ .caret {
184
+ border-top: 0;
185
+ border-bottom: @caret-width-base solid;
186
+ content: "";
187
+ }
188
+ // Different positioning for bottom up menu
189
+ .dropdown-menu {
190
+ top: auto;
191
+ bottom: 100%;
192
+ margin-bottom: 1px;
193
+ }
194
+ }
195
+
196
+
197
+ // Component alignment
198
+ //
199
+ // Reiterate per navbar.less and the modified component alignment there.
200
+
201
+ @media (min-width: @grid-float-breakpoint) {
202
+ .navbar-right {
203
+ .dropdown-menu {
204
+ .dropdown-menu-right();
205
+ }
206
+ // Necessary for overrides of the default right aligned menu.
207
+ // Will remove come v4 in all likelihood.
208
+ .dropdown-menu-left {
209
+ .dropdown-menu-left();
210
+ }
211
+ }
212
+ }
213
+
@@ -0,0 +1,438 @@
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
+ // Chrome and Firefox set a `min-width: -webkit-min-content;` on fieldsets,
15
+ // so we reset that to ensure it behaves more like a standard block element.
16
+ // See https://github.com/twbs/bootstrap/issues/12359.
17
+ min-width: 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
+ margin-bottom: 5px;
35
+ font-weight: bold;
36
+ }
37
+
38
+
39
+ // Normalize form controls
40
+ //
41
+ // While most of our form styles require extra classes, some basic normalization
42
+ // is required to ensure optimum display with or without those classes to better
43
+ // address browser inconsistencies.
44
+
45
+ // Override content-box in Normalize (* isn't specific enough)
46
+ input[type="search"] {
47
+ .box-sizing(border-box);
48
+ }
49
+
50
+ // Position radios and checkboxes better
51
+ input[type="radio"],
52
+ input[type="checkbox"] {
53
+ margin: 4px 0 0;
54
+ margin-top: 1px \9; /* IE8-9 */
55
+ line-height: normal;
56
+ }
57
+
58
+ // Set the height of file controls to match text inputs
59
+ input[type="file"] {
60
+ display: block;
61
+ }
62
+
63
+ // Make range inputs behave like textual form controls
64
+ input[type="range"] {
65
+ display: block;
66
+ width: 100%;
67
+ }
68
+
69
+ // Make multiple select elements height not fixed
70
+ select[multiple],
71
+ select[size] {
72
+ height: auto;
73
+ }
74
+
75
+ // Focus for file, radio, and checkbox
76
+ input[type="file"]:focus,
77
+ input[type="radio"]:focus,
78
+ input[type="checkbox"]:focus {
79
+ .tab-focus();
80
+ }
81
+
82
+ // Adjust output element
83
+ output {
84
+ display: block;
85
+ padding-top: (@padding-base-vertical + 1);
86
+ font-size: @font-size-base;
87
+ line-height: @line-height-base;
88
+ color: @input-color;
89
+ }
90
+
91
+
92
+ // Common form controls
93
+ //
94
+ // Shared size and type resets for form controls. Apply `.form-control` to any
95
+ // of the following form controls:
96
+ //
97
+ // select
98
+ // textarea
99
+ // input[type="text"]
100
+ // input[type="password"]
101
+ // input[type="datetime"]
102
+ // input[type="datetime-local"]
103
+ // input[type="date"]
104
+ // input[type="month"]
105
+ // input[type="time"]
106
+ // input[type="week"]
107
+ // input[type="number"]
108
+ // input[type="email"]
109
+ // input[type="url"]
110
+ // input[type="search"]
111
+ // input[type="tel"]
112
+ // input[type="color"]
113
+
114
+ .form-control {
115
+ display: block;
116
+ width: 100%;
117
+ height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
118
+ padding: @padding-base-vertical @padding-base-horizontal;
119
+ font-size: @font-size-base;
120
+ line-height: @line-height-base;
121
+ color: @input-color;
122
+ background-color: @input-bg;
123
+ background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
124
+ border: 1px solid @input-border;
125
+ border-radius: @input-border-radius;
126
+ .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
127
+ .transition(~"border-color ease-in-out .15s, box-shadow ease-in-out .15s");
128
+
129
+ // Customize the `:focus` state to imitate native WebKit styles.
130
+ .form-control-focus();
131
+
132
+ // Placeholder
133
+ .placeholder();
134
+
135
+ // Disabled and read-only inputs
136
+ //
137
+ // HTML5 says that controls under a fieldset > legend:first-child won't be
138
+ // disabled if the fieldset is disabled. Due to implementation difficulty, we
139
+ // don't honor that edge case; we style them as disabled anyway.
140
+ &[disabled],
141
+ &[readonly],
142
+ fieldset[disabled] & {
143
+ cursor: not-allowed;
144
+ background-color: @input-bg-disabled;
145
+ opacity: 1; // iOS fix for unreadable disabled content
146
+ }
147
+
148
+ // Reset height for `textarea`s
149
+ textarea& {
150
+ height: auto;
151
+ }
152
+ }
153
+
154
+
155
+ // Search inputs in iOS
156
+ //
157
+ // This overrides the extra rounded corners on search inputs in iOS so that our
158
+ // `.form-control` class can properly style them. Note that this cannot simply
159
+ // be added to `.form-control` as it's not specific enough. For details, see
160
+ // https://github.com/twbs/bootstrap/issues/11586.
161
+
162
+ input[type="search"] {
163
+ -webkit-appearance: none;
164
+ }
165
+
166
+
167
+ // Special styles for iOS date input
168
+ //
169
+ // In Mobile Safari, date inputs require a pixel line-height that matches the
170
+ // given height of the input.
171
+
172
+ input[type="date"] {
173
+ line-height: @input-height-base;
174
+ }
175
+
176
+
177
+ // Form groups
178
+ //
179
+ // Designed to help with the organization and spacing of vertical forms. For
180
+ // horizontal forms, use the predefined grid classes.
181
+
182
+ .form-group {
183
+ margin-bottom: 15px;
184
+ }
185
+
186
+
187
+ // Checkboxes and radios
188
+ //
189
+ // Indent the labels to position radios/checkboxes as hanging controls.
190
+
191
+ .radio,
192
+ .checkbox {
193
+ display: block;
194
+ min-height: @line-height-computed; // clear the floating input if there is no label text
195
+ margin-top: 10px;
196
+ margin-bottom: 10px;
197
+ padding-left: 20px;
198
+ label {
199
+ display: inline;
200
+ font-weight: normal;
201
+ cursor: pointer;
202
+ }
203
+ }
204
+ .radio input[type="radio"],
205
+ .radio-inline input[type="radio"],
206
+ .checkbox input[type="checkbox"],
207
+ .checkbox-inline input[type="checkbox"] {
208
+ float: left;
209
+ margin-left: -20px;
210
+ }
211
+ .radio + .radio,
212
+ .checkbox + .checkbox {
213
+ margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing
214
+ }
215
+
216
+ // Radios and checkboxes on same line
217
+ .radio-inline,
218
+ .checkbox-inline {
219
+ display: inline-block;
220
+ padding-left: 20px;
221
+ margin-bottom: 0;
222
+ vertical-align: middle;
223
+ font-weight: normal;
224
+ cursor: pointer;
225
+ }
226
+ .radio-inline + .radio-inline,
227
+ .checkbox-inline + .checkbox-inline {
228
+ margin-top: 0;
229
+ margin-left: 10px; // space out consecutive inline controls
230
+ }
231
+
232
+ // Apply same disabled cursor tweak as for inputs
233
+ //
234
+ // Note: Neither radios nor checkboxes can be readonly.
235
+ input[type="radio"],
236
+ input[type="checkbox"],
237
+ .radio,
238
+ .radio-inline,
239
+ .checkbox,
240
+ .checkbox-inline {
241
+ &[disabled],
242
+ fieldset[disabled] & {
243
+ cursor: not-allowed;
244
+ }
245
+ }
246
+
247
+
248
+ // Form control sizing
249
+ //
250
+ // Build on `.form-control` with modifier classes to decrease or increase the
251
+ // height and font-size of form controls.
252
+
253
+ .input-sm {
254
+ .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
255
+ }
256
+
257
+ .input-lg {
258
+ .input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
259
+ }
260
+
261
+
262
+ // Form control feedback states
263
+ //
264
+ // Apply contextual and semantic states to individual form controls.
265
+
266
+ .has-feedback {
267
+ // Enable absolute positioning
268
+ position: relative;
269
+
270
+ // Ensure icons don't overlap text
271
+ .form-control {
272
+ padding-right: (@input-height-base * 1.25);
273
+ }
274
+
275
+ // Feedback icon (requires .glyphicon classes)
276
+ .form-control-feedback {
277
+ position: absolute;
278
+ top: (@line-height-computed + 5); // Height of the `label` and its margin
279
+ right: 0;
280
+ display: block;
281
+ width: @input-height-base;
282
+ height: @input-height-base;
283
+ line-height: @input-height-base;
284
+ text-align: center;
285
+ }
286
+ }
287
+
288
+ // Feedback states
289
+ .has-success {
290
+ .form-control-validation(@state-success-text; @state-success-text; @state-success-bg);
291
+ }
292
+ .has-warning {
293
+ .form-control-validation(@state-warning-text; @state-warning-text; @state-warning-bg);
294
+ }
295
+ .has-error {
296
+ .form-control-validation(@state-danger-text; @state-danger-text; @state-danger-bg);
297
+ }
298
+
299
+
300
+ // Static form control text
301
+ //
302
+ // Apply class to a `p` element to make any string of text align with labels in
303
+ // a horizontal form layout.
304
+
305
+ .form-control-static {
306
+ margin-bottom: 0; // Remove default margin from `p`
307
+ }
308
+
309
+
310
+ // Help text
311
+ //
312
+ // Apply to any element you wish to create light text for placement immediately
313
+ // below a form control. Use for general help, formatting, or instructional text.
314
+
315
+ .help-block {
316
+ display: block; // account for any element using help-block
317
+ margin-top: 5px;
318
+ margin-bottom: 10px;
319
+ color: lighten(@text-color, 25%); // lighten the text some for contrast
320
+ }
321
+
322
+
323
+
324
+ // Inline forms
325
+ //
326
+ // Make forms appear inline(-block) by adding the `.form-inline` class. Inline
327
+ // forms begin stacked on extra small (mobile) devices and then go inline when
328
+ // viewports reach <768px.
329
+ //
330
+ // Requires wrapping inputs and labels with `.form-group` for proper display of
331
+ // default HTML form controls and our custom form controls (e.g., input groups).
332
+ //
333
+ // Heads up! This is mixin-ed into `.navbar-form` in navbars.less.
334
+
335
+ .form-inline {
336
+
337
+ // Kick in the inline
338
+ @media (min-width: @screen-sm-min) {
339
+ // Inline-block all the things for "inline"
340
+ .form-group {
341
+ display: inline-block;
342
+ margin-bottom: 0;
343
+ vertical-align: middle;
344
+ }
345
+
346
+ // In navbar-form, allow folks to *not* use `.form-group`
347
+ .form-control {
348
+ display: inline-block;
349
+ width: auto; // Prevent labels from stacking above inputs in `.form-group`
350
+ vertical-align: middle;
351
+ }
352
+ // Input groups need that 100% width though
353
+ .input-group > .form-control {
354
+ width: 100%;
355
+ }
356
+
357
+ .control-label {
358
+ margin-bottom: 0;
359
+ vertical-align: middle;
360
+ }
361
+
362
+ // Remove default margin on radios/checkboxes that were used for stacking, and
363
+ // then undo the floating of radios and checkboxes to match (which also avoids
364
+ // a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969).
365
+ .radio,
366
+ .checkbox {
367
+ display: inline-block;
368
+ margin-top: 0;
369
+ margin-bottom: 0;
370
+ padding-left: 0;
371
+ vertical-align: middle;
372
+ }
373
+ .radio input[type="radio"],
374
+ .checkbox input[type="checkbox"] {
375
+ float: none;
376
+ margin-left: 0;
377
+ }
378
+
379
+ // Validation states
380
+ //
381
+ // Reposition the icon because it's now within a grid column and columns have
382
+ // `position: relative;` on them. Also accounts for the grid gutter padding.
383
+ .has-feedback .form-control-feedback {
384
+ top: 0;
385
+ }
386
+ }
387
+ }
388
+
389
+
390
+ // Horizontal forms
391
+ //
392
+ // Horizontal forms are built on grid classes and allow you to create forms with
393
+ // labels on the left and inputs on the right.
394
+
395
+ .form-horizontal {
396
+
397
+ // Consistent vertical alignment of labels, radios, and checkboxes
398
+ .control-label,
399
+ .radio,
400
+ .checkbox,
401
+ .radio-inline,
402
+ .checkbox-inline {
403
+ margin-top: 0;
404
+ margin-bottom: 0;
405
+ padding-top: (@padding-base-vertical + 1); // Default padding plus a border
406
+ }
407
+ // Account for padding we're adding to ensure the alignment and of help text
408
+ // and other content below items
409
+ .radio,
410
+ .checkbox {
411
+ min-height: (@line-height-computed + (@padding-base-vertical + 1));
412
+ }
413
+
414
+ // Make form groups behave like rows
415
+ .form-group {
416
+ .make-row();
417
+ }
418
+
419
+ .form-control-static {
420
+ padding-top: (@padding-base-vertical + 1);
421
+ }
422
+
423
+ // Only right align form labels here when the columns stop stacking
424
+ @media (min-width: @screen-sm-min) {
425
+ .control-label {
426
+ text-align: right;
427
+ }
428
+ }
429
+
430
+ // Validation states
431
+ //
432
+ // Reposition the icon because it's now within a grid column and columns have
433
+ // `position: relative;` on them. Also accounts for the grid gutter padding.
434
+ .has-feedback .form-control-feedback {
435
+ top: 0;
436
+ right: (@grid-gutter-width / 2);
437
+ }
438
+ }