twitter-bootstrap-rails 2.2.8 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of twitter-bootstrap-rails might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/README.md +229 -322
- data/Rakefile +4 -6
- data/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/app/assets/fonts/glyphicons-halflings-regular.svg +288 -0
- data/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/app/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/app/assets/javascripts/twitter/bootstrap.js +12 -13
- data/app/assets/javascripts/twitter/bootstrap/affix.js +162 -0
- data/app/assets/javascripts/twitter/bootstrap/alert.js +94 -0
- data/app/assets/javascripts/twitter/bootstrap/button.js +120 -0
- data/app/assets/javascripts/twitter/bootstrap/carousel.js +237 -0
- data/app/assets/javascripts/twitter/bootstrap/collapse.js +211 -0
- data/app/assets/javascripts/twitter/bootstrap/dropdown.js +165 -0
- data/app/assets/javascripts/twitter/bootstrap/modal.js +337 -0
- data/app/assets/javascripts/twitter/bootstrap/popover.js +108 -0
- data/app/assets/javascripts/twitter/bootstrap/scrollspy.js +172 -0
- data/app/assets/javascripts/twitter/bootstrap/tab.js +155 -0
- data/app/assets/javascripts/twitter/bootstrap/tooltip.js +514 -0
- data/app/assets/javascripts/twitter/bootstrap/transition.js +59 -0
- data/app/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +1 -890
- data/app/assets/stylesheets/twitter-bootstrap-static/sprites.css.erb +1 -146
- data/app/helpers/bootstrap_flash_helper.rb +14 -7
- data/app/helpers/form_errors_helper.rb +22 -0
- data/app/helpers/glyph_helper.rb +12 -6
- data/app/helpers/modal_helper.rb +26 -22
- data/app/helpers/navbar_helper.rb +47 -32
- data/app/helpers/twitter_breadcrumbs_helper.rb +6 -2
- data/app/views/twitter-bootstrap/_breadcrumbs.html.erb +8 -8
- data/lib/generators/bootstrap/install/install_generator.rb +3 -2
- data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.css +3 -4
- data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +9 -18
- data/lib/generators/bootstrap/install/templates/en.bootstrap.yml +5 -0
- data/lib/generators/bootstrap/layout/layout_generator.rb +1 -4
- data/lib/generators/bootstrap/layout/templates/layout.html.erb +27 -48
- data/lib/generators/bootstrap/layout/templates/layout.html.haml +19 -34
- data/lib/generators/bootstrap/layout/templates/layout.html.slim +13 -30
- data/lib/generators/bootstrap/partial/templates/_login.html.erb +2 -3
- data/lib/generators/bootstrap/themed/templates/_form.html.erb +30 -10
- data/lib/generators/bootstrap/themed/templates/_form.html.haml +10 -8
- data/lib/generators/bootstrap/themed/templates/_form.html.slim +11 -9
- data/lib/generators/bootstrap/themed/templates/edit.html.slim +1 -1
- data/lib/generators/bootstrap/themed/templates/index.html.erb +4 -2
- data/lib/generators/bootstrap/themed/templates/index.html.haml +3 -2
- data/lib/generators/bootstrap/themed/templates/index.html.slim +6 -5
- data/lib/generators/bootstrap/themed/templates/new.html.slim +1 -1
- data/lib/generators/bootstrap/themed/templates/show.html.erb +5 -7
- data/lib/generators/bootstrap/themed/templates/show.html.haml +4 -4
- data/lib/generators/bootstrap/themed/templates/show.html.slim +6 -7
- data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.erb +5 -5
- data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.haml +3 -3
- data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.slim +4 -4
- data/lib/generators/bootstrap/themed/themed_generator.rb +2 -2
- data/lib/twitter/bootstrap/rails/breadcrumbs.rb +69 -0
- data/lib/twitter/bootstrap/rails/engine.rb +17 -10
- data/lib/twitter/bootstrap/rails/version.rb +2 -2
- data/spec/lib/breadcrumbs_spec.rb +99 -0
- data/spec/lib/twitter_bootstrap_rails/badge_label_helper_spec.rb +12 -4
- data/spec/lib/twitter_bootstrap_rails/bootstrap_flash_helper_spec.rb +128 -0
- data/spec/lib/twitter_bootstrap_rails/form_errors_helper_spec.rb +148 -0
- data/spec/lib/twitter_bootstrap_rails/glyph_helper_spec.rb +24 -0
- data/spec/lib/twitter_bootstrap_rails/modal_helper_spec.rb +15 -15
- data/spec/lib/twitter_bootstrap_rails/navbar_helper_spec.rb +207 -173
- data/spec/lib/twitter_bootstrap_rails/uri_state_spec.rb +18 -16
- data/spec/spec_helper.rb +11 -1
- data/vendor/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +5796 -1
- data/vendor/static-source/bootstrap.less +0 -1
- data/vendor/static-source/sprites.less +1 -1
- data/vendor/toolkit/twitter/bootstrap/alerts.less +51 -57
- data/vendor/toolkit/twitter/bootstrap/badges.less +66 -0
- data/vendor/toolkit/twitter/bootstrap/bootstrap.less +29 -36
- data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +11 -9
- data/vendor/toolkit/twitter/bootstrap/button-groups.less +167 -152
- data/vendor/toolkit/twitter/bootstrap/buttons.less +107 -169
- data/vendor/toolkit/twitter/bootstrap/carousel.less +177 -65
- data/vendor/toolkit/twitter/bootstrap/close.less +21 -19
- data/vendor/toolkit/twitter/bootstrap/code.less +38 -30
- data/vendor/toolkit/twitter/bootstrap/component-animations.less +15 -4
- data/vendor/toolkit/twitter/bootstrap/dropdowns.less +120 -152
- data/vendor/toolkit/twitter/bootstrap/forms.less +470 -547
- data/vendor/toolkit/twitter/bootstrap/glyphicons.less +305 -0
- data/vendor/toolkit/twitter/bootstrap/grid.less +74 -11
- data/vendor/toolkit/twitter/bootstrap/input-groups.less +171 -0
- data/vendor/toolkit/twitter/bootstrap/jumbotron.less +54 -0
- data/vendor/toolkit/twitter/bootstrap/labels.less +64 -0
- data/vendor/toolkit/twitter/bootstrap/list-group.less +130 -0
- data/vendor/toolkit/twitter/bootstrap/media.less +40 -29
- data/vendor/toolkit/twitter/bootstrap/mixins.less +37 -699
- data/vendor/toolkit/twitter/bootstrap/mixins/alerts.less +14 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/background-variant.less +9 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/border-radius.less +18 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/buttons.less +65 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/center-block.less +7 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/clearfix.less +22 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/forms.less +85 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/gradients.less +59 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/grid-framework.less +91 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/grid.less +122 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/hide-text.less +21 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/image.less +33 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/labels.less +12 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/list-group.less +30 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/nav-divider.less +10 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/nav-vertical-align.less +9 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/opacity.less +8 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/pagination.less +24 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/panels.less +24 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/progress-bar.less +10 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/reset-filter.less +8 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/reset-text.less +18 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/resize.less +6 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/responsive-visibility.less +15 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/size.less +10 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/tab-focus.less +9 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/table-row.less +28 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/text-emphasis.less +9 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/text-overflow.less +8 -0
- data/vendor/toolkit/twitter/bootstrap/mixins/vendor-prefixes.less +227 -0
- data/vendor/toolkit/twitter/bootstrap/modals.less +109 -54
- data/vendor/toolkit/twitter/bootstrap/navbar.less +547 -384
- data/vendor/toolkit/twitter/bootstrap/navs.less +192 -359
- data/vendor/toolkit/twitter/bootstrap/normalize.less +424 -0
- data/vendor/toolkit/twitter/bootstrap/pager.less +45 -34
- data/vendor/toolkit/twitter/bootstrap/pagination.less +71 -105
- data/vendor/toolkit/twitter/bootstrap/panels.less +271 -0
- data/vendor/toolkit/twitter/bootstrap/popovers.less +66 -68
- data/vendor/toolkit/twitter/bootstrap/print.less +101 -0
- data/vendor/toolkit/twitter/bootstrap/progress-bars.less +40 -75
- data/vendor/toolkit/twitter/bootstrap/responsive-embed.less +35 -0
- data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +177 -42
- data/vendor/toolkit/twitter/bootstrap/scaffolding.less +131 -23
- data/vendor/toolkit/twitter/bootstrap/tables.less +172 -182
- data/vendor/toolkit/twitter/bootstrap/theme.less +291 -0
- data/vendor/toolkit/twitter/bootstrap/thumbnails.less +27 -44
- data/vendor/toolkit/twitter/bootstrap/tooltip.less +58 -27
- data/vendor/toolkit/twitter/bootstrap/type.less +209 -154
- data/vendor/toolkit/twitter/bootstrap/utilities.less +32 -7
- data/vendor/toolkit/twitter/bootstrap/variables.less +784 -216
- data/vendor/toolkit/twitter/bootstrap/wells.less +7 -7
- metadata +156 -141
- data/app/assets/fonts/fontawesome-webfont.eot +0 -0
- data/app/assets/fonts/fontawesome-webfont.svg +0 -399
- data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/app/assets/fonts/fontawesome-webfont.woff +0 -0
- data/app/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
- data/app/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-affix.js +0 -117
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +0 -99
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-button.js +0 -105
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +0 -207
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +0 -167
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +0 -169
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +0 -247
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +0 -114
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +0 -162
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +0 -144
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +0 -361
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +0 -60
- data/app/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +0 -335
- data/app/assets/stylesheets/twitter-bootstrap-static/fontawesome.css.erb +0 -787
- data/lib/twitter/bootstrap/rails/twitter-bootstrap-breadcrumbs.rb +0 -42
- data/test/lib/breadcrumbs_test.rb +0 -75
- data/test/test_helper.rb +0 -11
- data/vendor/static-source/fontawesome.less +0 -9
- data/vendor/toolkit/fontawesome/bootstrap.less +0 -84
- data/vendor/toolkit/fontawesome/core.less +0 -129
- data/vendor/toolkit/fontawesome/extras.less +0 -93
- data/vendor/toolkit/fontawesome/font-awesome-ie7.less +0 -1953
- data/vendor/toolkit/fontawesome/font-awesome.less +0 -33
- data/vendor/toolkit/fontawesome/icons.less +0 -381
- data/vendor/toolkit/fontawesome/mixins.less +0 -48
- data/vendor/toolkit/fontawesome/path.less +0 -14
- data/vendor/toolkit/fontawesome/variables.less +0 -735
- data/vendor/toolkit/twitter/bootstrap/accordion.less +0 -34
- data/vendor/toolkit/twitter/bootstrap/hero-unit.less +0 -25
- data/vendor/toolkit/twitter/bootstrap/labels-badges.less +0 -84
- data/vendor/toolkit/twitter/bootstrap/layouts.less +0 -16
- data/vendor/toolkit/twitter/bootstrap/reset.less +0 -216
- data/vendor/toolkit/twitter/bootstrap/responsive-1200px-min.less +0 -28
- data/vendor/toolkit/twitter/bootstrap/responsive-767px-max.less +0 -193
- data/vendor/toolkit/twitter/bootstrap/responsive-768px-979px.less +0 -19
- data/vendor/toolkit/twitter/bootstrap/responsive-navbar.less +0 -189
- data/vendor/toolkit/twitter/bootstrap/responsive.less +0 -48
- data/vendor/toolkit/twitter/bootstrap/sprites.less +0 -197
@@ -3,167 +3,67 @@
|
|
3
3
|
// --------------------------------------------------
|
4
4
|
|
5
5
|
|
6
|
-
//
|
7
|
-
//
|
8
|
-
|
9
|
-
// Make all forms have space below them
|
10
|
-
form {
|
11
|
-
margin: 0 0 @baseLineHeight;
|
12
|
-
}
|
6
|
+
// Normalize non-controls
|
7
|
+
//
|
8
|
+
// Restyle and baseline non-control form elements.
|
13
9
|
|
14
10
|
fieldset {
|
15
11
|
padding: 0;
|
16
12
|
margin: 0;
|
17
13
|
border: 0;
|
14
|
+
// Chrome and Firefox set a `min-width: 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
18
|
}
|
19
19
|
|
20
|
-
// Groups of fields with labels on top (legends)
|
21
20
|
legend {
|
22
21
|
display: block;
|
23
22
|
width: 100%;
|
24
23
|
padding: 0;
|
25
|
-
margin-bottom: @
|
26
|
-
font-size: @
|
27
|
-
line-height:
|
28
|
-
color: @
|
24
|
+
margin-bottom: @line-height-computed;
|
25
|
+
font-size: (@font-size-base * 1.5);
|
26
|
+
line-height: inherit;
|
27
|
+
color: @legend-color;
|
29
28
|
border: 0;
|
30
|
-
border-bottom: 1px solid
|
31
|
-
|
32
|
-
// Small
|
33
|
-
small {
|
34
|
-
font-size: @baseLineHeight * .75;
|
35
|
-
color: @grayLight;
|
36
|
-
}
|
37
|
-
}
|
38
|
-
|
39
|
-
// Set font for forms
|
40
|
-
label,
|
41
|
-
input,
|
42
|
-
button,
|
43
|
-
select,
|
44
|
-
textarea {
|
45
|
-
#font > .shorthand(@baseFontSize,normal,@baseLineHeight); // Set size, weight, line-height here
|
46
|
-
}
|
47
|
-
input,
|
48
|
-
button,
|
49
|
-
select,
|
50
|
-
textarea {
|
51
|
-
font-family: @baseFontFamily; // And only set font-family here for those that need it (note the missing label element)
|
29
|
+
border-bottom: 1px solid @legend-border-color;
|
52
30
|
}
|
53
31
|
|
54
|
-
// Identify controls by their labels
|
55
32
|
label {
|
56
|
-
display: block;
|
33
|
+
display: inline-block;
|
34
|
+
max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141)
|
57
35
|
margin-bottom: 5px;
|
36
|
+
font-weight: bold;
|
58
37
|
}
|
59
38
|
|
60
|
-
// Form controls
|
61
|
-
// -------------------------
|
62
|
-
|
63
|
-
// Shared size and type resets
|
64
|
-
select,
|
65
|
-
textarea,
|
66
|
-
input[type="text"],
|
67
|
-
input[type="password"],
|
68
|
-
input[type="datetime"],
|
69
|
-
input[type="datetime-local"],
|
70
|
-
input[type="date"],
|
71
|
-
input[type="month"],
|
72
|
-
input[type="time"],
|
73
|
-
input[type="week"],
|
74
|
-
input[type="number"],
|
75
|
-
input[type="email"],
|
76
|
-
input[type="url"],
|
77
|
-
input[type="search"],
|
78
|
-
input[type="tel"],
|
79
|
-
input[type="color"],
|
80
|
-
.uneditable-input {
|
81
|
-
display: inline-block;
|
82
|
-
height: @baseLineHeight;
|
83
|
-
padding: 4px 6px;
|
84
|
-
margin-bottom: @baseLineHeight / 2;
|
85
|
-
font-size: @baseFontSize;
|
86
|
-
line-height: @baseLineHeight;
|
87
|
-
color: @gray;
|
88
|
-
.border-radius(@inputBorderRadius);
|
89
|
-
vertical-align: middle;
|
90
|
-
}
|
91
39
|
|
92
|
-
//
|
93
|
-
//
|
94
|
-
|
95
|
-
|
96
|
-
.
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
height: auto;
|
102
|
-
}
|
103
|
-
// Everything else
|
104
|
-
textarea,
|
105
|
-
input[type="text"],
|
106
|
-
input[type="password"],
|
107
|
-
input[type="datetime"],
|
108
|
-
input[type="datetime-local"],
|
109
|
-
input[type="date"],
|
110
|
-
input[type="month"],
|
111
|
-
input[type="time"],
|
112
|
-
input[type="week"],
|
113
|
-
input[type="number"],
|
114
|
-
input[type="email"],
|
115
|
-
input[type="url"],
|
116
|
-
input[type="search"],
|
117
|
-
input[type="tel"],
|
118
|
-
input[type="color"],
|
119
|
-
.uneditable-input {
|
120
|
-
background-color: @inputBackground;
|
121
|
-
border: 1px solid @inputBorder;
|
122
|
-
.box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
|
123
|
-
.transition(~"border linear .2s, box-shadow linear .2s");
|
124
|
-
|
125
|
-
// Focus state
|
126
|
-
&:focus {
|
127
|
-
border-color: rgba(82,168,236,.8);
|
128
|
-
outline: 0;
|
129
|
-
outline: thin dotted \9; /* IE6-9 */
|
130
|
-
.box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)");
|
131
|
-
}
|
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
|
+
// Override content-box in Normalize (* isn't specific enough)
|
47
|
+
input[type="search"] {
|
48
|
+
.box-sizing(border-box);
|
132
49
|
}
|
133
50
|
|
134
51
|
// Position radios and checkboxes better
|
135
52
|
input[type="radio"],
|
136
53
|
input[type="checkbox"] {
|
137
54
|
margin: 4px 0 0;
|
138
|
-
|
139
|
-
margin-top: 1px \9; /* IE8-9 */
|
55
|
+
margin-top: 1px \9; // IE8-9
|
140
56
|
line-height: normal;
|
141
57
|
}
|
142
58
|
|
143
|
-
// Reset width of input images, buttons, radios, checkboxes
|
144
|
-
input[type="file"],
|
145
|
-
input[type="image"],
|
146
|
-
input[type="submit"],
|
147
|
-
input[type="reset"],
|
148
|
-
input[type="button"],
|
149
|
-
input[type="radio"],
|
150
|
-
input[type="checkbox"] {
|
151
|
-
width: auto; // Override of generic input selector
|
152
|
-
}
|
153
|
-
|
154
|
-
// Set the height of select and file controls to match text inputs
|
155
|
-
select,
|
156
59
|
input[type="file"] {
|
157
|
-
|
158
|
-
*margin-top: 4px; /* For IE7, add top margin to align select with labels */
|
159
|
-
line-height: @inputHeight;
|
60
|
+
display: block;
|
160
61
|
}
|
161
62
|
|
162
|
-
// Make
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
background-color: @inputBackground; // Chrome on Linux and Mobile Safari need background-color
|
63
|
+
// Make range inputs behave like textual form controls
|
64
|
+
input[type="range"] {
|
65
|
+
display: block;
|
66
|
+
width: 100%;
|
167
67
|
}
|
168
68
|
|
169
69
|
// Make multiple select elements height not fixed
|
@@ -172,519 +72,542 @@ select[size] {
|
|
172
72
|
height: auto;
|
173
73
|
}
|
174
74
|
|
175
|
-
// Focus for
|
176
|
-
select:focus,
|
75
|
+
// Focus for file, radio, and checkbox
|
177
76
|
input[type="file"]:focus,
|
178
77
|
input[type="radio"]:focus,
|
179
78
|
input[type="checkbox"]:focus {
|
180
79
|
.tab-focus();
|
181
80
|
}
|
182
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; // Note: This has no effect on <select>s in some browsers, due to the limited stylability of <select>s in CSS.
|
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");
|
183
128
|
|
184
|
-
//
|
185
|
-
|
129
|
+
// Customize the `:focus` state to imitate native WebKit styles.
|
130
|
+
.form-control-focus();
|
186
131
|
|
187
|
-
//
|
188
|
-
.
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
132
|
+
// Placeholder
|
133
|
+
.placeholder();
|
134
|
+
|
135
|
+
// Unstyle the caret on `<select>`s in IE10+.
|
136
|
+
&::-ms-expand {
|
137
|
+
border: 0;
|
138
|
+
background-color: transparent;
|
139
|
+
}
|
140
|
+
|
141
|
+
// Disabled and read-only inputs
|
142
|
+
//
|
143
|
+
// HTML5 says that controls under a fieldset > legend:first-child won't be
|
144
|
+
// disabled if the fieldset is disabled. Due to implementation difficulty, we
|
145
|
+
// don't honor that edge case; we style them as disabled anyway.
|
146
|
+
&[disabled],
|
147
|
+
&[readonly],
|
148
|
+
fieldset[disabled] & {
|
149
|
+
background-color: @input-bg-disabled;
|
150
|
+
opacity: 1; // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655
|
151
|
+
}
|
152
|
+
|
153
|
+
&[disabled],
|
154
|
+
fieldset[disabled] & {
|
155
|
+
cursor: @cursor-disabled;
|
156
|
+
}
|
157
|
+
|
158
|
+
// Reset height for `textarea`s
|
159
|
+
textarea& {
|
160
|
+
height: auto;
|
161
|
+
}
|
195
162
|
}
|
196
163
|
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
164
|
+
|
165
|
+
// Search inputs in iOS
|
166
|
+
//
|
167
|
+
// This overrides the extra rounded corners on search inputs in iOS so that our
|
168
|
+
// `.form-control` class can properly style them. Note that this cannot simply
|
169
|
+
// be added to `.form-control` as it's not specific enough. For details, see
|
170
|
+
// https://github.com/twbs/bootstrap/issues/11586.
|
171
|
+
|
172
|
+
input[type="search"] {
|
173
|
+
-webkit-appearance: none;
|
201
174
|
}
|
202
175
|
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
176
|
+
|
177
|
+
// Special styles for iOS temporal inputs
|
178
|
+
//
|
179
|
+
// In Mobile Safari, setting `display: block` on temporal inputs causes the
|
180
|
+
// text within the input to become vertically misaligned. As a workaround, we
|
181
|
+
// set a pixel line-height that matches the given height of the input, but only
|
182
|
+
// for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848
|
183
|
+
//
|
184
|
+
// Note that as of 8.3, iOS doesn't support `datetime` or `week`.
|
185
|
+
|
186
|
+
@media screen and (-webkit-min-device-pixel-ratio: 0) {
|
187
|
+
input[type="date"],
|
188
|
+
input[type="time"],
|
189
|
+
input[type="datetime-local"],
|
190
|
+
input[type="month"] {
|
191
|
+
&.form-control {
|
192
|
+
line-height: @input-height-base;
|
193
|
+
}
|
194
|
+
|
195
|
+
&.input-sm,
|
196
|
+
.input-group-sm & {
|
197
|
+
line-height: @input-height-small;
|
198
|
+
}
|
199
|
+
|
200
|
+
&.input-lg,
|
201
|
+
.input-group-lg & {
|
202
|
+
line-height: @input-height-large;
|
203
|
+
}
|
204
|
+
}
|
207
205
|
}
|
208
206
|
|
209
207
|
|
210
|
-
//
|
211
|
-
//
|
208
|
+
// Form groups
|
209
|
+
//
|
210
|
+
// Designed to help with the organization and spacing of vertical forms. For
|
211
|
+
// horizontal forms, use the predefined grid classes.
|
212
212
|
|
213
|
-
|
214
|
-
|
215
|
-
textarea {
|
216
|
-
.placeholder();
|
213
|
+
.form-group {
|
214
|
+
margin-bottom: @form-group-margin-bottom;
|
217
215
|
}
|
218
216
|
|
219
217
|
|
220
|
-
//
|
221
|
-
//
|
218
|
+
// Checkboxes and radios
|
219
|
+
//
|
220
|
+
// Indent the labels to position radios/checkboxes as hanging controls.
|
222
221
|
|
223
|
-
// Indent the labels to position radios/checkboxes as hanging
|
224
222
|
.radio,
|
225
223
|
.checkbox {
|
226
|
-
|
227
|
-
|
224
|
+
position: relative;
|
225
|
+
display: block;
|
226
|
+
margin-top: 10px;
|
227
|
+
margin-bottom: 10px;
|
228
|
+
|
229
|
+
label {
|
230
|
+
min-height: @line-height-computed; // Ensure the input doesn't jump when there is no text
|
231
|
+
padding-left: 20px;
|
232
|
+
margin-bottom: 0;
|
233
|
+
font-weight: normal;
|
234
|
+
cursor: pointer;
|
235
|
+
}
|
228
236
|
}
|
229
237
|
.radio input[type="radio"],
|
230
|
-
.
|
231
|
-
|
238
|
+
.radio-inline input[type="radio"],
|
239
|
+
.checkbox input[type="checkbox"],
|
240
|
+
.checkbox-inline input[type="checkbox"] {
|
241
|
+
position: absolute;
|
232
242
|
margin-left: -20px;
|
243
|
+
margin-top: 4px \9;
|
233
244
|
}
|
234
245
|
|
235
|
-
|
236
|
-
.
|
237
|
-
|
238
|
-
padding-top: 5px; // has to be padding because margin collaspes
|
246
|
+
.radio + .radio,
|
247
|
+
.checkbox + .checkbox {
|
248
|
+
margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing
|
239
249
|
}
|
240
250
|
|
241
251
|
// Radios and checkboxes on same line
|
242
|
-
|
243
|
-
.
|
244
|
-
|
252
|
+
.radio-inline,
|
253
|
+
.checkbox-inline {
|
254
|
+
position: relative;
|
245
255
|
display: inline-block;
|
246
|
-
padding-
|
256
|
+
padding-left: 20px;
|
247
257
|
margin-bottom: 0;
|
248
258
|
vertical-align: middle;
|
259
|
+
font-weight: normal;
|
260
|
+
cursor: pointer;
|
249
261
|
}
|
250
|
-
.radio
|
251
|
-
.checkbox
|
262
|
+
.radio-inline + .radio-inline,
|
263
|
+
.checkbox-inline + .checkbox-inline {
|
264
|
+
margin-top: 0;
|
252
265
|
margin-left: 10px; // space out consecutive inline controls
|
253
266
|
}
|
254
267
|
|
255
|
-
|
256
|
-
|
257
|
-
//
|
258
|
-
//
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
.
|
277
|
-
.
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
.input-prepend input[class*="span"],
|
285
|
-
.input-prepend .uneditable-input[class*="span"],
|
286
|
-
.row-fluid input[class*="span"],
|
287
|
-
.row-fluid select[class*="span"],
|
288
|
-
.row-fluid textarea[class*="span"],
|
289
|
-
.row-fluid .uneditable-input[class*="span"],
|
290
|
-
.row-fluid .input-prepend [class*="span"],
|
291
|
-
.row-fluid .input-append [class*="span"] {
|
292
|
-
display: inline-block;
|
268
|
+
// Apply same disabled cursor tweak as for inputs
|
269
|
+
// Some special care is needed because <label>s don't inherit their parent's `cursor`.
|
270
|
+
//
|
271
|
+
// Note: Neither radios nor checkboxes can be readonly.
|
272
|
+
input[type="radio"],
|
273
|
+
input[type="checkbox"] {
|
274
|
+
&[disabled],
|
275
|
+
&.disabled,
|
276
|
+
fieldset[disabled] & {
|
277
|
+
cursor: @cursor-disabled;
|
278
|
+
}
|
279
|
+
}
|
280
|
+
// These classes are used directly on <label>s
|
281
|
+
.radio-inline,
|
282
|
+
.checkbox-inline {
|
283
|
+
&.disabled,
|
284
|
+
fieldset[disabled] & {
|
285
|
+
cursor: @cursor-disabled;
|
286
|
+
}
|
287
|
+
}
|
288
|
+
// These classes are used on elements with <label> descendants
|
289
|
+
.radio,
|
290
|
+
.checkbox {
|
291
|
+
&.disabled,
|
292
|
+
fieldset[disabled] & {
|
293
|
+
label {
|
294
|
+
cursor: @cursor-disabled;
|
295
|
+
}
|
296
|
+
}
|
293
297
|
}
|
294
298
|
|
295
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
|
+
// Size it appropriately next to real form controls
|
307
|
+
padding-top: (@padding-base-vertical + 1);
|
308
|
+
padding-bottom: (@padding-base-vertical + 1);
|
309
|
+
// Remove default margin from `p`
|
310
|
+
margin-bottom: 0;
|
311
|
+
min-height: (@line-height-computed + @font-size-base);
|
296
312
|
|
297
|
-
|
298
|
-
|
313
|
+
&.input-lg,
|
314
|
+
&.input-sm {
|
315
|
+
padding-left: 0;
|
316
|
+
padding-right: 0;
|
317
|
+
}
|
318
|
+
}
|
299
319
|
|
300
|
-
// Grid sizes
|
301
|
-
#grid > .input(@gridColumnWidth, @gridGutterWidth);
|
302
320
|
|
303
|
-
//
|
304
|
-
|
305
|
-
|
321
|
+
// Form control sizing
|
322
|
+
//
|
323
|
+
// Build on `.form-control` with modifier classes to decrease or increase the
|
324
|
+
// height and font-size of form controls.
|
325
|
+
//
|
326
|
+
// The `.form-group-* form-control` variations are sadly duplicated to avoid the
|
327
|
+
// issue documented in https://github.com/twbs/bootstrap/issues/15074.
|
328
|
+
|
329
|
+
.input-sm {
|
330
|
+
.input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @input-border-radius-small);
|
331
|
+
}
|
332
|
+
.form-group-sm {
|
333
|
+
.form-control {
|
334
|
+
height: @input-height-small;
|
335
|
+
padding: @padding-small-vertical @padding-small-horizontal;
|
336
|
+
font-size: @font-size-small;
|
337
|
+
line-height: @line-height-small;
|
338
|
+
border-radius: @input-border-radius-small;
|
339
|
+
}
|
340
|
+
select.form-control {
|
341
|
+
height: @input-height-small;
|
342
|
+
line-height: @input-height-small;
|
343
|
+
}
|
344
|
+
textarea.form-control,
|
345
|
+
select[multiple].form-control {
|
346
|
+
height: auto;
|
347
|
+
}
|
348
|
+
.form-control-static {
|
349
|
+
height: @input-height-small;
|
350
|
+
min-height: (@line-height-computed + @font-size-small);
|
351
|
+
padding: (@padding-small-vertical + 1) @padding-small-horizontal;
|
352
|
+
font-size: @font-size-small;
|
353
|
+
line-height: @line-height-small;
|
354
|
+
}
|
306
355
|
}
|
307
356
|
|
308
|
-
|
309
|
-
.
|
310
|
-
// Redeclare the fluid grid collapse since we undo the float for inputs
|
311
|
-
.row-fluid .controls-row [class*="span"] {
|
312
|
-
float: left;
|
357
|
+
.input-lg {
|
358
|
+
.input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @input-border-radius-large);
|
313
359
|
}
|
314
|
-
|
315
|
-
.
|
316
|
-
|
317
|
-
|
360
|
+
.form-group-lg {
|
361
|
+
.form-control {
|
362
|
+
height: @input-height-large;
|
363
|
+
padding: @padding-large-vertical @padding-large-horizontal;
|
364
|
+
font-size: @font-size-large;
|
365
|
+
line-height: @line-height-large;
|
366
|
+
border-radius: @input-border-radius-large;
|
367
|
+
}
|
368
|
+
select.form-control {
|
369
|
+
height: @input-height-large;
|
370
|
+
line-height: @input-height-large;
|
371
|
+
}
|
372
|
+
textarea.form-control,
|
373
|
+
select[multiple].form-control {
|
374
|
+
height: auto;
|
375
|
+
}
|
376
|
+
.form-control-static {
|
377
|
+
height: @input-height-large;
|
378
|
+
min-height: (@line-height-computed + @font-size-large);
|
379
|
+
padding: (@padding-large-vertical + 1) @padding-large-horizontal;
|
380
|
+
font-size: @font-size-large;
|
381
|
+
line-height: @line-height-large;
|
382
|
+
}
|
318
383
|
}
|
319
384
|
|
320
385
|
|
386
|
+
// Form control feedback states
|
387
|
+
//
|
388
|
+
// Apply contextual and semantic states to individual form controls.
|
321
389
|
|
390
|
+
.has-feedback {
|
391
|
+
// Enable absolute positioning
|
392
|
+
position: relative;
|
322
393
|
|
323
|
-
//
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
input[disabled],
|
328
|
-
select[disabled],
|
329
|
-
textarea[disabled],
|
330
|
-
input[readonly],
|
331
|
-
select[readonly],
|
332
|
-
textarea[readonly] {
|
333
|
-
cursor: not-allowed;
|
334
|
-
background-color: @inputDisabledBackground;
|
394
|
+
// Ensure icons don't overlap text
|
395
|
+
.form-control {
|
396
|
+
padding-right: (@input-height-base * 1.25);
|
397
|
+
}
|
335
398
|
}
|
336
|
-
//
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
399
|
+
// Feedback icon (requires .glyphicon classes)
|
400
|
+
.form-control-feedback {
|
401
|
+
position: absolute;
|
402
|
+
top: 0;
|
403
|
+
right: 0;
|
404
|
+
z-index: 2; // Ensure icon is above input groups
|
405
|
+
display: block;
|
406
|
+
width: @input-height-base;
|
407
|
+
height: @input-height-base;
|
408
|
+
line-height: @input-height-base;
|
409
|
+
text-align: center;
|
410
|
+
pointer-events: none;
|
342
411
|
}
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
// Warning
|
351
|
-
.control-group.warning {
|
352
|
-
.formFieldState(@warningText, @warningText, @warningBackground);
|
412
|
+
.input-lg + .form-control-feedback,
|
413
|
+
.input-group-lg + .form-control-feedback,
|
414
|
+
.form-group-lg .form-control + .form-control-feedback {
|
415
|
+
width: @input-height-large;
|
416
|
+
height: @input-height-large;
|
417
|
+
line-height: @input-height-large;
|
353
418
|
}
|
354
|
-
|
355
|
-
.
|
356
|
-
|
419
|
+
.input-sm + .form-control-feedback,
|
420
|
+
.input-group-sm + .form-control-feedback,
|
421
|
+
.form-group-sm .form-control + .form-control-feedback {
|
422
|
+
width: @input-height-small;
|
423
|
+
height: @input-height-small;
|
424
|
+
line-height: @input-height-small;
|
357
425
|
}
|
358
|
-
|
359
|
-
|
360
|
-
|
426
|
+
|
427
|
+
// Feedback states
|
428
|
+
.has-success {
|
429
|
+
.form-control-validation(@state-success-text; @state-success-text; @state-success-bg);
|
361
430
|
}
|
362
|
-
|
363
|
-
.control-
|
364
|
-
.formFieldState(@infoText, @infoText, @infoBackground);
|
431
|
+
.has-warning {
|
432
|
+
.form-control-validation(@state-warning-text; @state-warning-text; @state-warning-bg);
|
365
433
|
}
|
366
|
-
|
367
|
-
|
368
|
-
// Shares styles with the .control-group.error above
|
369
|
-
input:focus:invalid,
|
370
|
-
textarea:focus:invalid,
|
371
|
-
select:focus:invalid {
|
372
|
-
color: #b94a48;
|
373
|
-
border-color: #ee5f5b;
|
374
|
-
&:focus {
|
375
|
-
border-color: darken(#ee5f5b, 10%);
|
376
|
-
@shadow: 0 0 6px lighten(#ee5f5b, 20%);
|
377
|
-
.box-shadow(@shadow);
|
378
|
-
}
|
434
|
+
.has-error {
|
435
|
+
.form-control-validation(@state-danger-text; @state-danger-text; @state-danger-bg);
|
379
436
|
}
|
380
437
|
|
438
|
+
// Reposition feedback icon if input has visible label above
|
439
|
+
.has-feedback label {
|
381
440
|
|
382
|
-
|
383
|
-
//
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
margin-top: @baseLineHeight;
|
389
|
-
margin-bottom: @baseLineHeight;
|
390
|
-
background-color: @formActionsBackground;
|
391
|
-
border-top: 1px solid #e5e5e5;
|
392
|
-
.clearfix(); // Adding clearfix to allow for .pull-right button containers
|
441
|
+
& ~ .form-control-feedback {
|
442
|
+
top: (@line-height-computed + 5); // Height of the `label` and its margin
|
443
|
+
}
|
444
|
+
&.sr-only ~ .form-control-feedback {
|
445
|
+
top: 0;
|
446
|
+
}
|
393
447
|
}
|
394
448
|
|
395
449
|
|
396
|
-
|
397
|
-
//
|
398
|
-
//
|
399
|
-
|
400
|
-
.help-block,
|
401
|
-
.help-inline {
|
402
|
-
color: lighten(@textColor, 15%); // lighten the text some for contrast
|
403
|
-
}
|
450
|
+
// Help text
|
451
|
+
//
|
452
|
+
// Apply to any element you wish to create light text for placement immediately
|
453
|
+
// below a form control. Use for general help, formatting, or instructional text.
|
404
454
|
|
405
455
|
.help-block {
|
406
456
|
display: block; // account for any element using help-block
|
407
|
-
margin-
|
457
|
+
margin-top: 5px;
|
458
|
+
margin-bottom: 10px;
|
459
|
+
color: lighten(@text-color, 25%); // lighten the text some for contrast
|
408
460
|
}
|
409
461
|
|
410
|
-
.help-inline {
|
411
|
-
display: inline-block;
|
412
|
-
.ie7-inline-block();
|
413
|
-
vertical-align: middle;
|
414
|
-
padding-left: 5px;
|
415
|
-
}
|
416
462
|
|
463
|
+
// Inline forms
|
464
|
+
//
|
465
|
+
// Make forms appear inline(-block) by adding the `.form-inline` class. Inline
|
466
|
+
// forms begin stacked on extra small (mobile) devices and then go inline when
|
467
|
+
// viewports reach <768px.
|
468
|
+
//
|
469
|
+
// Requires wrapping inputs and labels with `.form-group` for proper display of
|
470
|
+
// default HTML form controls and our custom form controls (e.g., input groups).
|
471
|
+
//
|
472
|
+
// Heads up! This is mixin-ed into `.navbar-form` in navbars.less.
|
417
473
|
|
474
|
+
.form-inline {
|
418
475
|
|
419
|
-
//
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
margin-bottom: @baseLineHeight / 2;
|
427
|
-
vertical-align: middle;
|
428
|
-
font-size: 0; // white space collapse hack
|
429
|
-
white-space: nowrap; // Prevent span and input from separating
|
430
|
-
|
431
|
-
// Reset the white space collapse hack
|
432
|
-
input,
|
433
|
-
select,
|
434
|
-
.uneditable-input,
|
435
|
-
.dropdown-menu,
|
436
|
-
.popover {
|
437
|
-
font-size: @baseFontSize;
|
438
|
-
}
|
439
|
-
|
440
|
-
input,
|
441
|
-
select,
|
442
|
-
.uneditable-input {
|
443
|
-
position: relative; // placed here by default so that on :focus we can place the input above the .add-on for full border and box-shadow goodness
|
444
|
-
margin-bottom: 0; // prevent bottom margin from screwing up alignment in stacked forms
|
445
|
-
*margin-left: 0;
|
446
|
-
vertical-align: top;
|
447
|
-
.border-radius(0 @inputBorderRadius @inputBorderRadius 0);
|
448
|
-
// Make input on top when focused so blue border and shadow always show
|
449
|
-
&:focus {
|
450
|
-
z-index: 2;
|
476
|
+
// Kick in the inline
|
477
|
+
@media (min-width: @screen-sm-min) {
|
478
|
+
// Inline-block all the things for "inline"
|
479
|
+
.form-group {
|
480
|
+
display: inline-block;
|
481
|
+
margin-bottom: 0;
|
482
|
+
vertical-align: middle;
|
451
483
|
}
|
452
|
-
}
|
453
|
-
.add-on {
|
454
|
-
display: inline-block;
|
455
|
-
width: auto;
|
456
|
-
height: @baseLineHeight;
|
457
|
-
min-width: 16px;
|
458
|
-
padding: 4px 5px;
|
459
|
-
font-size: @baseFontSize;
|
460
|
-
font-weight: normal;
|
461
|
-
line-height: @baseLineHeight;
|
462
|
-
text-align: center;
|
463
|
-
text-shadow: 0 1px 0 @white;
|
464
|
-
background-color: @grayLighter;
|
465
|
-
border: 1px solid #ccc;
|
466
|
-
}
|
467
|
-
.add-on,
|
468
|
-
.btn,
|
469
|
-
.btn-group > .dropdown-toggle {
|
470
|
-
vertical-align: top;
|
471
|
-
.border-radius(0);
|
472
|
-
}
|
473
|
-
.active {
|
474
|
-
background-color: lighten(@green, 30);
|
475
|
-
border-color: @green;
|
476
|
-
}
|
477
|
-
}
|
478
484
|
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
.add-on:first-child,
|
485
|
-
.btn:first-child {
|
486
|
-
// FYI, `.btn:first-child` accounts for a button group that's prepended
|
487
|
-
.border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
|
488
|
-
}
|
489
|
-
}
|
490
|
-
|
491
|
-
.input-append {
|
492
|
-
input,
|
493
|
-
select,
|
494
|
-
.uneditable-input {
|
495
|
-
.border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
|
496
|
-
+ .btn-group .btn:last-child {
|
497
|
-
.border-radius(0 @inputBorderRadius @inputBorderRadius 0);
|
485
|
+
// In navbar-form, allow folks to *not* use `.form-group`
|
486
|
+
.form-control {
|
487
|
+
display: inline-block;
|
488
|
+
width: auto; // Prevent labels from stacking above inputs in `.form-group`
|
489
|
+
vertical-align: middle;
|
498
490
|
}
|
499
|
-
}
|
500
|
-
.add-on,
|
501
|
-
.btn,
|
502
|
-
.btn-group {
|
503
|
-
margin-left: -1px;
|
504
|
-
}
|
505
|
-
.add-on:last-child,
|
506
|
-
.btn:last-child,
|
507
|
-
.btn-group:last-child > .dropdown-toggle {
|
508
|
-
.border-radius(0 @inputBorderRadius @inputBorderRadius 0);
|
509
|
-
}
|
510
|
-
}
|
511
491
|
|
512
|
-
//
|
513
|
-
.
|
514
|
-
|
515
|
-
select,
|
516
|
-
.uneditable-input {
|
517
|
-
.border-radius(0);
|
518
|
-
+ .btn-group .btn {
|
519
|
-
.border-radius(0 @inputBorderRadius @inputBorderRadius 0);
|
492
|
+
// Make static controls behave like regular ones
|
493
|
+
.form-control-static {
|
494
|
+
display: inline-block;
|
520
495
|
}
|
521
|
-
}
|
522
|
-
.add-on:first-child,
|
523
|
-
.btn:first-child {
|
524
|
-
margin-right: -1px;
|
525
|
-
.border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
|
526
|
-
}
|
527
|
-
.add-on:last-child,
|
528
|
-
.btn:last-child {
|
529
|
-
margin-left: -1px;
|
530
|
-
.border-radius(0 @inputBorderRadius @inputBorderRadius 0);
|
531
|
-
}
|
532
|
-
.btn-group:first-child {
|
533
|
-
margin-left: 0;
|
534
|
-
}
|
535
|
-
}
|
536
496
|
|
497
|
+
.input-group {
|
498
|
+
display: inline-table;
|
499
|
+
vertical-align: middle;
|
537
500
|
|
501
|
+
.input-group-addon,
|
502
|
+
.input-group-btn,
|
503
|
+
.form-control {
|
504
|
+
width: auto;
|
505
|
+
}
|
506
|
+
}
|
538
507
|
|
508
|
+
// Input groups need that 100% width though
|
509
|
+
.input-group > .form-control {
|
510
|
+
width: 100%;
|
511
|
+
}
|
539
512
|
|
540
|
-
|
541
|
-
|
513
|
+
.control-label {
|
514
|
+
margin-bottom: 0;
|
515
|
+
vertical-align: middle;
|
516
|
+
}
|
542
517
|
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
518
|
+
// Remove default margin on radios/checkboxes that were used for stacking, and
|
519
|
+
// then undo the floating of radios and checkboxes to match.
|
520
|
+
.radio,
|
521
|
+
.checkbox {
|
522
|
+
display: inline-block;
|
523
|
+
margin-top: 0;
|
524
|
+
margin-bottom: 0;
|
525
|
+
vertical-align: middle;
|
526
|
+
|
527
|
+
label {
|
528
|
+
padding-left: 0;
|
529
|
+
}
|
530
|
+
}
|
531
|
+
.radio input[type="radio"],
|
532
|
+
.checkbox input[type="checkbox"] {
|
533
|
+
position: relative;
|
534
|
+
margin-left: 0;
|
535
|
+
}
|
551
536
|
|
552
|
-
|
553
|
-
.
|
554
|
-
|
555
|
-
|
556
|
-
}
|
557
|
-
.form-search .input-append .search-query {
|
558
|
-
.border-radius(14px 0 0 14px);
|
559
|
-
}
|
560
|
-
.form-search .input-append .btn {
|
561
|
-
.border-radius(0 14px 14px 0);
|
562
|
-
}
|
563
|
-
.form-search .input-prepend .search-query {
|
564
|
-
.border-radius(0 14px 14px 0);
|
565
|
-
}
|
566
|
-
.form-search .input-prepend .btn {
|
567
|
-
.border-radius(14px 0 0 14px);
|
537
|
+
// Re-override the feedback icon.
|
538
|
+
.has-feedback .form-control-feedback {
|
539
|
+
top: 0;
|
540
|
+
}
|
541
|
+
}
|
568
542
|
}
|
569
543
|
|
570
544
|
|
545
|
+
// Horizontal forms
|
546
|
+
//
|
547
|
+
// Horizontal forms are built on grid classes and allow you to create forms with
|
548
|
+
// labels on the left and inputs on the right.
|
571
549
|
|
572
|
-
|
573
|
-
// HORIZONTAL & VERTICAL FORMS
|
574
|
-
// ---------------------------
|
575
|
-
|
576
|
-
// Common properties
|
577
|
-
// -----------------
|
578
|
-
|
579
|
-
.form-search,
|
580
|
-
.form-inline,
|
581
550
|
.form-horizontal {
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
.
|
586
|
-
.
|
587
|
-
.
|
588
|
-
.
|
589
|
-
|
590
|
-
|
551
|
+
|
552
|
+
// Consistent vertical alignment of radios and checkboxes
|
553
|
+
//
|
554
|
+
// Labels also get some reset styles, but that is scoped to a media query below.
|
555
|
+
.radio,
|
556
|
+
.checkbox,
|
557
|
+
.radio-inline,
|
558
|
+
.checkbox-inline {
|
559
|
+
margin-top: 0;
|
591
560
|
margin-bottom: 0;
|
592
|
-
|
561
|
+
padding-top: (@padding-base-vertical + 1); // Default padding plus a border
|
593
562
|
}
|
594
|
-
//
|
595
|
-
|
596
|
-
|
563
|
+
// Account for padding we're adding to ensure the alignment and of help text
|
564
|
+
// and other content below items
|
565
|
+
.radio,
|
566
|
+
.checkbox {
|
567
|
+
min-height: (@line-height-computed + (@padding-base-vertical + 1));
|
597
568
|
}
|
598
|
-
}
|
599
|
-
.form-search label,
|
600
|
-
.form-inline label,
|
601
|
-
.form-search .btn-group,
|
602
|
-
.form-inline .btn-group {
|
603
|
-
display: inline-block;
|
604
|
-
}
|
605
|
-
// Remove margin for input-prepend/-append
|
606
|
-
.form-search .input-append,
|
607
|
-
.form-inline .input-append,
|
608
|
-
.form-search .input-prepend,
|
609
|
-
.form-inline .input-prepend {
|
610
|
-
margin-bottom: 0;
|
611
|
-
}
|
612
|
-
// Inline checkbox/radio labels (remove padding on left)
|
613
|
-
.form-search .radio,
|
614
|
-
.form-search .checkbox,
|
615
|
-
.form-inline .radio,
|
616
|
-
.form-inline .checkbox {
|
617
|
-
padding-left: 0;
|
618
|
-
margin-bottom: 0;
|
619
|
-
vertical-align: middle;
|
620
|
-
}
|
621
|
-
// Remove float and margin, set to inline-block
|
622
|
-
.form-search .radio input[type="radio"],
|
623
|
-
.form-search .checkbox input[type="checkbox"],
|
624
|
-
.form-inline .radio input[type="radio"],
|
625
|
-
.form-inline .checkbox input[type="checkbox"] {
|
626
|
-
float: left;
|
627
|
-
margin-right: 3px;
|
628
|
-
margin-left: 0;
|
629
|
-
}
|
630
|
-
|
631
569
|
|
632
|
-
//
|
633
|
-
.
|
634
|
-
|
635
|
-
}
|
636
|
-
|
637
|
-
// Legend collapses margin, so next element is responsible for spacing
|
638
|
-
legend + .control-group {
|
639
|
-
margin-top: @baseLineHeight;
|
640
|
-
-webkit-margin-top-collapse: separate;
|
641
|
-
}
|
642
|
-
|
643
|
-
// Horizontal-specific styles
|
644
|
-
// --------------------------
|
645
|
-
|
646
|
-
.form-horizontal {
|
647
|
-
// Increase spacing between groups
|
648
|
-
.control-group {
|
649
|
-
margin-bottom: @baseLineHeight;
|
650
|
-
.clearfix();
|
651
|
-
}
|
652
|
-
// Float the labels left
|
653
|
-
.control-label {
|
654
|
-
float: left;
|
655
|
-
width: @horizontalComponentOffset - 20;
|
656
|
-
padding-top: 5px;
|
657
|
-
text-align: right;
|
570
|
+
// Make form groups behave like rows
|
571
|
+
.form-group {
|
572
|
+
.make-row();
|
658
573
|
}
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
&:first-child {
|
668
|
-
*padding-left: @horizontalComponentOffset;
|
574
|
+
|
575
|
+
// Reset spacing and right align labels, but scope to media queries so that
|
576
|
+
// labels on narrow viewports stack the same as a default form example.
|
577
|
+
@media (min-width: @screen-sm-min) {
|
578
|
+
.control-label {
|
579
|
+
text-align: right;
|
580
|
+
margin-bottom: 0;
|
581
|
+
padding-top: (@padding-base-vertical + 1); // Default padding plus a border
|
669
582
|
}
|
670
583
|
}
|
671
|
-
|
672
|
-
|
673
|
-
|
584
|
+
|
585
|
+
// Validation states
|
586
|
+
//
|
587
|
+
// Reposition the icon because it's now within a grid column and columns have
|
588
|
+
// `position: relative;` on them. Also accounts for the grid gutter padding.
|
589
|
+
.has-feedback .form-control-feedback {
|
590
|
+
right: floor((@grid-gutter-width / 2));
|
674
591
|
}
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
.
|
681
|
-
|
682
|
-
|
683
|
-
|
592
|
+
|
593
|
+
// Form group sizes
|
594
|
+
//
|
595
|
+
// Quick utility class for applying `.input-lg` and `.input-sm` styles to the
|
596
|
+
// inputs and labels within a `.form-group`.
|
597
|
+
.form-group-lg {
|
598
|
+
@media (min-width: @screen-sm-min) {
|
599
|
+
.control-label {
|
600
|
+
padding-top: (@padding-large-vertical + 1);
|
601
|
+
font-size: @font-size-large;
|
602
|
+
}
|
684
603
|
}
|
685
604
|
}
|
686
|
-
|
687
|
-
|
688
|
-
|
605
|
+
.form-group-sm {
|
606
|
+
@media (min-width: @screen-sm-min) {
|
607
|
+
.control-label {
|
608
|
+
padding-top: (@padding-small-vertical + 1);
|
609
|
+
font-size: @font-size-small;
|
610
|
+
}
|
611
|
+
}
|
689
612
|
}
|
690
613
|
}
|