bootstrap-sass 2.3.2.2 → 3.0.0.0.rc
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bootstrap-sass might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.gitignore +9 -0
- data/.travis.yml +8 -2
- data/CHANGELOG.md +4 -0
- data/CONTRIBUTING.md +12 -4
- data/README.md +87 -74
- data/Rakefile +31 -3
- data/bootstrap-sass.gemspec +14 -2
- data/lib/bootstrap-sass/engine.rb +1 -1
- data/lib/bootstrap-sass/version.rb +4 -0
- data/tasks/converter.rb +829 -0
- data/templates/project/_variables.scss.erb +6 -0
- data/templates/project/manifest.rb +8 -13
- data/templates/project/styles.scss +1 -6
- data/test/compass_test.rb +8 -0
- data/test/compilation_test.rb +1 -1
- data/test/dummy/README.rdoc +3 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/images/.keep +0 -0
- data/test/dummy/app/assets/javascripts/application.js +2 -0
- data/test/dummy/app/assets/stylesheets/application.css.sass +1 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/controllers/pages_controller.rb +4 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/pages/root.html.slim +11 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +17 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +26 -0
- data/test/dummy/config/environments/production.rb +76 -0
- data/test/dummy/config/environments/test.rb +30 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +18 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +3 -0
- data/test/dummy/config/locales/es.yml +3 -0
- data/test/dummy/config/routes.rb +3 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/dummy/log/development.log +0 -0
- data/test/dummy/public/404.html +58 -0
- data/test/dummy/public/422.html +58 -0
- data/test/dummy/public/500.html +57 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/gemfiles/sass_3_2.gemfile +1 -1
- data/test/gemfiles/sass_3_3.gemfile +6 -0
- data/test/pages_test.rb +14 -0
- data/test/support/integration_test.rb +29 -0
- data/test/test_helper.rb +26 -1
- data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
- data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +228 -0
- data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
- data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
- data/vendor/assets/javascripts/bootstrap.js +12 -13
- data/vendor/assets/javascripts/bootstrap/affix.js +126 -0
- data/vendor/assets/javascripts/bootstrap/alert.js +98 -0
- data/vendor/assets/javascripts/bootstrap/button.js +109 -0
- data/vendor/assets/javascripts/bootstrap/carousel.js +217 -0
- data/vendor/assets/javascripts/bootstrap/collapse.js +179 -0
- data/vendor/assets/javascripts/bootstrap/dropdown.js +154 -0
- data/vendor/assets/javascripts/bootstrap/modal.js +246 -0
- data/vendor/assets/javascripts/bootstrap/popover.js +117 -0
- data/vendor/assets/javascripts/bootstrap/scrollspy.js +158 -0
- data/vendor/assets/javascripts/bootstrap/tab.js +135 -0
- data/vendor/assets/javascripts/bootstrap/tooltip.js +386 -0
- data/vendor/assets/javascripts/bootstrap/transition.js +56 -0
- data/vendor/assets/stylesheets/bootstrap/_alerts.scss +46 -58
- data/vendor/assets/stylesheets/bootstrap/_badges.scss +51 -0
- data/vendor/assets/stylesheets/bootstrap/_breadcrumbs.scss +8 -9
- data/vendor/assets/stylesheets/bootstrap/_button-groups.scss +173 -154
- data/vendor/assets/stylesheets/bootstrap/_buttons.scss +97 -165
- data/vendor/assets/stylesheets/bootstrap/_carousel.scss +116 -65
- data/vendor/assets/stylesheets/bootstrap/_close.scss +11 -8
- data/vendor/assets/stylesheets/bootstrap/_code.scss +16 -21
- data/vendor/assets/stylesheets/bootstrap/_component-animations.scss +10 -3
- data/vendor/assets/stylesheets/bootstrap/_dropdowns.scss +94 -148
- data/vendor/assets/stylesheets/bootstrap/_forms.scss +222 -559
- data/vendor/assets/stylesheets/bootstrap/_glyphicons.scss +232 -0
- data/vendor/assets/stylesheets/bootstrap/_grid.scss +336 -11
- data/vendor/assets/stylesheets/bootstrap/_input-groups.scss +127 -0
- data/vendor/assets/stylesheets/bootstrap/_jumbotron.scss +40 -0
- data/vendor/assets/stylesheets/bootstrap/_labels.scss +58 -0
- data/vendor/assets/stylesheets/bootstrap/_list-group.scss +90 -0
- data/vendor/assets/stylesheets/bootstrap/_media.scss +8 -7
- data/vendor/assets/stylesheets/bootstrap/_mixins.scss +468 -434
- data/vendor/assets/stylesheets/bootstrap/_modals.scss +103 -52
- data/vendor/assets/stylesheets/bootstrap/_navbar.scss +511 -383
- data/vendor/assets/stylesheets/bootstrap/_navs.scss +169 -349
- data/vendor/assets/stylesheets/bootstrap/_normalize.scss +396 -0
- data/vendor/assets/stylesheets/bootstrap/_pager.scss +45 -33
- data/vendor/assets/stylesheets/bootstrap/_pagination.scss +65 -105
- data/vendor/assets/stylesheets/bootstrap/_panels.scss +148 -0
- data/vendor/assets/stylesheets/bootstrap/_popovers.scss +51 -51
- data/vendor/assets/stylesheets/bootstrap/_print.scss +100 -0
- data/vendor/assets/stylesheets/bootstrap/_progress-bars.scss +28 -55
- data/vendor/assets/stylesheets/bootstrap/_responsive-utilities.scss +180 -45
- data/vendor/assets/stylesheets/bootstrap/_scaffolding.scss +101 -24
- data/vendor/assets/stylesheets/bootstrap/_tables.scss +169 -168
- data/vendor/assets/stylesheets/bootstrap/_theme.scss +232 -0
- data/vendor/assets/stylesheets/bootstrap/_thumbnails.scss +11 -33
- data/vendor/assets/stylesheets/bootstrap/_tooltip.scss +45 -20
- data/vendor/assets/stylesheets/bootstrap/_type.scss +101 -110
- data/vendor/assets/stylesheets/bootstrap/_utilities.scss +19 -22
- data/vendor/assets/stylesheets/bootstrap/_variables.scss +498 -179
- data/vendor/assets/stylesheets/bootstrap/_wells.scss +7 -7
- data/vendor/assets/stylesheets/bootstrap/bootstrap.scss +29 -33
- metadata +201 -34
- data/asseturl.patch +0 -15
- data/templates/project/_variables.scss +0 -301
- data/update-bootstrap.sh +0 -25
- data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/images/glyphicons-halflings.png +0 -0
- data/vendor/assets/javascripts/bootstrap-affix.js +0 -117
- data/vendor/assets/javascripts/bootstrap-alert.js +0 -99
- data/vendor/assets/javascripts/bootstrap-button.js +0 -105
- data/vendor/assets/javascripts/bootstrap-carousel.js +0 -207
- data/vendor/assets/javascripts/bootstrap-collapse.js +0 -167
- data/vendor/assets/javascripts/bootstrap-dropdown.js +0 -169
- data/vendor/assets/javascripts/bootstrap-modal.js +0 -247
- data/vendor/assets/javascripts/bootstrap-popover.js +0 -114
- data/vendor/assets/javascripts/bootstrap-scrollspy.js +0 -162
- data/vendor/assets/javascripts/bootstrap-tab.js +0 -144
- data/vendor/assets/javascripts/bootstrap-tooltip.js +0 -361
- data/vendor/assets/javascripts/bootstrap-transition.js +0 -60
- data/vendor/assets/javascripts/bootstrap-typeahead.js +0 -335
- data/vendor/assets/stylesheets/bootstrap-responsive.scss +0 -1
- data/vendor/assets/stylesheets/bootstrap/_accordion.scss +0 -34
- data/vendor/assets/stylesheets/bootstrap/_hero-unit.scss +0 -25
- data/vendor/assets/stylesheets/bootstrap/_labels-badges.scss +0 -83
- data/vendor/assets/stylesheets/bootstrap/_layouts.scss +0 -16
- data/vendor/assets/stylesheets/bootstrap/_reset.scss +0 -216
- data/vendor/assets/stylesheets/bootstrap/_responsive-1200px-min.scss +0 -28
- data/vendor/assets/stylesheets/bootstrap/_responsive-767px-max.scss +0 -193
- data/vendor/assets/stylesheets/bootstrap/_responsive-768px-979px.scss +0 -19
- data/vendor/assets/stylesheets/bootstrap/_responsive-navbar.scss +0 -189
- data/vendor/assets/stylesheets/bootstrap/_sprites.scss +0 -197
- data/vendor/assets/stylesheets/bootstrap/responsive.scss +0 -48
@@ -3,13 +3,9 @@
|
|
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;
|
@@ -17,153 +13,43 @@ fieldset {
|
|
17
13
|
border: 0;
|
18
14
|
}
|
19
15
|
|
20
|
-
// Groups of fields with labels on top (legends)
|
21
16
|
legend {
|
22
17
|
display: block;
|
23
18
|
width: 100%;
|
24
19
|
padding: 0;
|
25
|
-
margin-bottom: $
|
26
|
-
font-size: $
|
27
|
-
line-height:
|
28
|
-
color: $
|
20
|
+
margin-bottom: $line-height-computed;
|
21
|
+
font-size: ($font-size-base * 1.5);
|
22
|
+
line-height: inherit;
|
23
|
+
color: $legend-color;
|
29
24
|
border: 0;
|
30
|
-
border-bottom: 1px solid
|
31
|
-
|
32
|
-
// Small
|
33
|
-
small {
|
34
|
-
font-size: $baseLineHeight * .75;
|
35
|
-
color: $grayLight;
|
36
|
-
}
|
25
|
+
border-bottom: 1px solid $legend-border-color;
|
37
26
|
}
|
38
27
|
|
39
|
-
// Set font for forms
|
40
|
-
label,
|
41
|
-
input,
|
42
|
-
button,
|
43
|
-
select,
|
44
|
-
textarea {
|
45
|
-
@include 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)
|
52
|
-
}
|
53
|
-
|
54
|
-
// Identify controls by their labels
|
55
28
|
label {
|
56
|
-
display: block;
|
29
|
+
display: inline-block;
|
57
30
|
margin-bottom: 5px;
|
31
|
+
font-weight: bold;
|
58
32
|
}
|
59
33
|
|
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
|
-
@include border-radius($inputBorderRadius);
|
89
|
-
vertical-align: middle;
|
90
|
-
}
|
91
34
|
|
92
|
-
//
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
width: 206px; // plus 12px padding and 2px border
|
98
|
-
}
|
99
|
-
// Reset height since textareas have rows
|
100
|
-
textarea {
|
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
|
-
@include box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
|
123
|
-
@include 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
|
-
@include box-shadow(inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6));
|
131
|
-
}
|
35
|
+
// Normalize form controls
|
36
|
+
|
37
|
+
// Override content-box in Normalize (* isn't specific enough)
|
38
|
+
input[type="search"] {
|
39
|
+
@include box-sizing(border-box);
|
132
40
|
}
|
133
41
|
|
134
42
|
// Position radios and checkboxes better
|
135
43
|
input[type="radio"],
|
136
44
|
input[type="checkbox"] {
|
137
45
|
margin: 4px 0 0;
|
138
|
-
*margin-top: 0; /* IE7 */
|
139
46
|
margin-top: 1px \9; /* IE8-9 */
|
140
47
|
line-height: normal;
|
141
48
|
}
|
142
49
|
|
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
50
|
// Set the height of select and file controls to match text inputs
|
155
|
-
select,
|
156
51
|
input[type="file"] {
|
157
|
-
|
158
|
-
*margin-top: 4px; /* For IE7, add top margin to align select with labels */
|
159
|
-
line-height: $inputHeight;
|
160
|
-
}
|
161
|
-
|
162
|
-
// Make select elements obey height by applying a border
|
163
|
-
select {
|
164
|
-
width: 220px; // default input width + 10px of padding that doesn't get applied
|
165
|
-
border: 1px solid $inputBorder;
|
166
|
-
background-color: $inputBackground; // Chrome on Linux and Mobile Safari need background-color
|
52
|
+
display: block;
|
167
53
|
}
|
168
54
|
|
169
55
|
// Make multiple select elements height not fixed
|
@@ -172,518 +58,295 @@ select[size] {
|
|
172
58
|
height: auto;
|
173
59
|
}
|
174
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
|
+
|
175
68
|
// Focus for select, file, radio, and checkbox
|
176
|
-
select:focus,
|
177
69
|
input[type="file"]:focus,
|
178
70
|
input[type="radio"]:focus,
|
179
71
|
input[type="checkbox"]:focus {
|
180
72
|
@include tab-focus();
|
181
73
|
}
|
182
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
|
+
}
|
183
84
|
|
184
|
-
// Uneditable inputs
|
185
|
-
// -------------------------
|
186
85
|
|
187
|
-
//
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
@include box-shadow(inset 0 1px 2px rgba(0,0,0,.025));
|
194
|
-
cursor: not-allowed;
|
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
|
+
@include placeholder();
|
195
92
|
}
|
196
93
|
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
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
|
+
@include box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
|
130
|
+
@include 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
|
+
@include form-control-focus();
|
134
|
+
|
135
|
+
// Disabled and read-only inputs
|
136
|
+
// Note: HTML5 says that controls under a fieldset > legend:first-child won't
|
137
|
+
// be 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
|
+
// [converter] extracted textarea& to textarea.form-control
|
201
147
|
}
|
202
148
|
|
203
|
-
//
|
204
|
-
.
|
205
|
-
width: auto;
|
149
|
+
// Reset height for `textarea`s
|
150
|
+
textarea.form-control {
|
206
151
|
height: auto;
|
207
152
|
}
|
208
153
|
|
209
154
|
|
210
|
-
//
|
211
|
-
//
|
155
|
+
// Form groups
|
156
|
+
//
|
157
|
+
// Designed to help with the organization and spacing of vertical forms. For
|
158
|
+
// horizontal forms, use the predefined grid classes.
|
212
159
|
|
213
|
-
|
214
|
-
|
215
|
-
textarea {
|
216
|
-
@include placeholder();
|
160
|
+
.form-group {
|
161
|
+
margin-bottom: 15px;
|
217
162
|
}
|
218
163
|
|
219
164
|
|
220
|
-
//
|
221
|
-
//
|
165
|
+
// Checkboxes and radios
|
166
|
+
//
|
167
|
+
// Indent the labels to position radios/checkboxes as hanging controls.
|
222
168
|
|
223
|
-
// Indent the labels to position radios/checkboxes as hanging
|
224
169
|
.radio,
|
225
170
|
.checkbox {
|
226
|
-
|
171
|
+
display: block;
|
172
|
+
min-height: $line-height-computed; // clear the floating input if there is no label text
|
173
|
+
margin-top: 10px;
|
174
|
+
margin-bottom: 10px;
|
227
175
|
padding-left: 20px;
|
176
|
+
vertical-align: middle;
|
177
|
+
label {
|
178
|
+
display: inline;
|
179
|
+
margin-bottom: 0;
|
180
|
+
font-weight: normal;
|
181
|
+
cursor: pointer;
|
182
|
+
}
|
228
183
|
}
|
229
184
|
.radio input[type="radio"],
|
230
|
-
.
|
185
|
+
.radio-inline input[type="radio"],
|
186
|
+
.checkbox input[type="checkbox"],
|
187
|
+
.checkbox-inline input[type="checkbox"] {
|
231
188
|
float: left;
|
232
189
|
margin-left: -20px;
|
233
190
|
}
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
.controls > .checkbox:first-child {
|
238
|
-
padding-top: 5px; // has to be padding because margin collaspes
|
191
|
+
.radio + .radio,
|
192
|
+
.checkbox + .checkbox {
|
193
|
+
margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing
|
239
194
|
}
|
240
195
|
|
241
196
|
// Radios and checkboxes on same line
|
242
|
-
|
243
|
-
.
|
244
|
-
.checkbox.inline {
|
197
|
+
.radio-inline,
|
198
|
+
.checkbox-inline {
|
245
199
|
display: inline-block;
|
246
|
-
padding-
|
200
|
+
padding-left: 20px;
|
247
201
|
margin-bottom: 0;
|
248
202
|
vertical-align: middle;
|
203
|
+
font-weight: normal;
|
204
|
+
cursor: pointer;
|
249
205
|
}
|
250
|
-
.radio
|
251
|
-
.checkbox
|
206
|
+
.radio-inline + .radio-inline,
|
207
|
+
.checkbox-inline + .checkbox-inline {
|
208
|
+
margin-top: 0;
|
252
209
|
margin-left: 10px; // space out consecutive inline controls
|
253
210
|
}
|
254
211
|
|
255
|
-
|
256
|
-
|
257
|
-
//
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
.
|
262
|
-
.
|
263
|
-
.
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
// Grid style input sizes
|
269
|
-
input[class*="span"],
|
270
|
-
select[class*="span"],
|
271
|
-
textarea[class*="span"],
|
272
|
-
.uneditable-input[class*="span"],
|
273
|
-
// Redeclare since the fluid row class is more specific
|
274
|
-
.row-fluid input[class*="span"],
|
275
|
-
.row-fluid select[class*="span"],
|
276
|
-
.row-fluid textarea[class*="span"],
|
277
|
-
.row-fluid .uneditable-input[class*="span"] {
|
278
|
-
float: none;
|
279
|
-
margin-left: 0;
|
280
|
-
}
|
281
|
-
// Ensure input-prepend/append never wraps
|
282
|
-
.input-append input[class*="span"],
|
283
|
-
.input-append .uneditable-input[class*="span"],
|
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;
|
293
|
-
}
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
// GRID SIZING FOR INPUTS
|
298
|
-
// ----------------------
|
299
|
-
|
300
|
-
// Grid sizes
|
301
|
-
@include grid-input($gridColumnWidth, $gridGutterWidth);
|
302
|
-
|
303
|
-
// Control row for multiple inputs per line
|
304
|
-
.controls-row {
|
305
|
-
@include clearfix(); // Clear the float from controls
|
306
|
-
}
|
307
|
-
|
308
|
-
// Float to collapse white-space for proper grid alignment
|
309
|
-
.controls-row [class*="span"],
|
310
|
-
// Redeclare the fluid grid collapse since we undo the float for inputs
|
311
|
-
.row-fluid .controls-row [class*="span"] {
|
312
|
-
float: left;
|
313
|
-
}
|
314
|
-
// Explicity set top padding on all checkboxes/radios, not just first-child
|
315
|
-
.controls-row .checkbox[class*="span"],
|
316
|
-
.controls-row .radio[class*="span"] {
|
317
|
-
padding-top: 5px;
|
212
|
+
// Apply same disabled cursor tweak as for inputs
|
213
|
+
//
|
214
|
+
// Note: Neither radios nor checkboxes can be readonly.
|
215
|
+
input[type="radio"],
|
216
|
+
input[type="checkbox"],
|
217
|
+
.radio,
|
218
|
+
.radio-inline,
|
219
|
+
.checkbox,
|
220
|
+
.checkbox-inline {
|
221
|
+
&[disabled],
|
222
|
+
fieldset[disabled] & {
|
223
|
+
cursor: not-allowed;
|
224
|
+
}
|
318
225
|
}
|
319
226
|
|
227
|
+
// Form control sizing
|
320
228
|
|
229
|
+
@include input-size('.input-sm', $input-height-small, $padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $border-radius-small);
|
321
230
|
|
322
|
-
|
323
|
-
// DISABLED STATE
|
324
|
-
// --------------
|
325
|
-
|
326
|
-
// Disabled and read-only inputs
|
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;
|
335
|
-
}
|
336
|
-
// Explicitly reset the colors here
|
337
|
-
input[type="radio"][disabled],
|
338
|
-
input[type="checkbox"][disabled],
|
339
|
-
input[type="radio"][readonly],
|
340
|
-
input[type="checkbox"][readonly] {
|
341
|
-
background-color: transparent;
|
342
|
-
}
|
231
|
+
@include input-size('.input-lg', $input-height-large, $padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $border-radius-large);
|
343
232
|
|
344
233
|
|
345
|
-
|
346
|
-
|
347
|
-
//
|
348
|
-
// --------------------------
|
234
|
+
// Form control feedback states
|
235
|
+
//
|
236
|
+
// Apply contextual and semantic states to individual form controls.
|
349
237
|
|
350
238
|
// Warning
|
351
|
-
.
|
352
|
-
@include
|
239
|
+
.has-warning {
|
240
|
+
@include form-control-validation($state-warning-text, $state-warning-text, $state-warning-bg);
|
353
241
|
}
|
354
242
|
// Error
|
355
|
-
.
|
356
|
-
@include
|
243
|
+
.has-error {
|
244
|
+
@include form-control-validation($state-danger-text, $state-danger-text, $state-danger-bg);
|
357
245
|
}
|
358
246
|
// Success
|
359
|
-
.
|
360
|
-
@include
|
361
|
-
}
|
362
|
-
// Info
|
363
|
-
.control-group.info {
|
364
|
-
@include formFieldState($infoText, $infoText, $infoBackground);
|
365
|
-
}
|
366
|
-
|
367
|
-
// HTML5 invalid states
|
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
|
-
@include box-shadow(0 0 6px lighten(#ee5f5b, 20%));
|
377
|
-
}
|
247
|
+
.has-success {
|
248
|
+
@include form-control-validation($state-success-text, $state-success-text, $state-success-bg);
|
378
249
|
}
|
379
250
|
|
380
251
|
|
252
|
+
// Static form control text
|
253
|
+
//
|
254
|
+
// Apply class to a `p` element to make any string of text align with labels in
|
255
|
+
// a horizontal form layout.
|
381
256
|
|
382
|
-
|
383
|
-
//
|
384
|
-
|
385
|
-
.form-actions {
|
386
|
-
padding: ($baseLineHeight - 1) 20px $baseLineHeight;
|
387
|
-
margin-top: $baseLineHeight;
|
388
|
-
margin-bottom: $baseLineHeight;
|
389
|
-
background-color: $formActionsBackground;
|
390
|
-
border-top: 1px solid #e5e5e5;
|
391
|
-
@include clearfix(); // Adding clearfix to allow for .pull-right button containers
|
257
|
+
.form-control-static {
|
258
|
+
margin-bottom: 0; // Remove default margin from `p`
|
259
|
+
padding-top: ($padding-base-vertical + 1);
|
392
260
|
}
|
393
261
|
|
394
262
|
|
395
|
-
|
396
|
-
//
|
397
|
-
//
|
398
|
-
|
399
|
-
.help-block,
|
400
|
-
.help-inline {
|
401
|
-
color: lighten($textColor, 15%); // lighten the text some for contrast
|
402
|
-
}
|
263
|
+
// Help text
|
264
|
+
//
|
265
|
+
// Apply to any element you wish to create light text for placement immediately
|
266
|
+
// below a form control. Use for general help, formatting, or instructional text.
|
403
267
|
|
404
268
|
.help-block {
|
405
269
|
display: block; // account for any element using help-block
|
406
|
-
margin-
|
407
|
-
|
408
|
-
|
409
|
-
.help-inline {
|
410
|
-
display: inline-block;
|
411
|
-
@include ie7-inline-block();
|
412
|
-
vertical-align: middle;
|
413
|
-
padding-left: 5px;
|
270
|
+
margin-top: 5px;
|
271
|
+
margin-bottom: 10px;
|
272
|
+
color: lighten($text-color, 25%); // lighten the text some for contrast
|
414
273
|
}
|
415
274
|
|
416
275
|
|
417
276
|
|
418
|
-
//
|
419
|
-
//
|
277
|
+
// Inline forms
|
278
|
+
//
|
279
|
+
// Make forms appear inline(-block) by adding the `.form-inline` class. Inline
|
280
|
+
// forms begin stacked on extra small (mobile) devices and then go inline when
|
281
|
+
// viewports reach <768px.
|
282
|
+
//
|
283
|
+
// Requires wrapping inputs and labels with `.form-group` for proper display of
|
284
|
+
// default HTML form controls and our custom form controls (e.g., input groups).
|
285
|
+
//
|
286
|
+
// Heads up! This is mixin-ed into `.navbar-form` in navbars.less.
|
420
287
|
|
421
|
-
|
422
|
-
.input-append,
|
423
|
-
.input-prepend {
|
424
|
-
display: inline-block;
|
425
|
-
margin-bottom: $baseLineHeight / 2;
|
426
|
-
vertical-align: middle;
|
427
|
-
font-size: 0; // white space collapse hack
|
428
|
-
white-space: nowrap; // Prevent span and input from separating
|
429
|
-
|
430
|
-
// Reset the white space collapse hack
|
431
|
-
input,
|
432
|
-
select,
|
433
|
-
.uneditable-input,
|
434
|
-
.dropdown-menu,
|
435
|
-
.popover {
|
436
|
-
font-size: $baseFontSize;
|
437
|
-
}
|
288
|
+
.form-inline {
|
438
289
|
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
@include border-radius(0 $inputBorderRadius $inputBorderRadius 0);
|
447
|
-
// Make input on top when focused so blue border and shadow always show
|
448
|
-
&:focus {
|
449
|
-
z-index: 2;
|
290
|
+
// Kick in the inline
|
291
|
+
@media (min-width: $screen-tablet) {
|
292
|
+
// Inline-block all the things for "inline"
|
293
|
+
.form-group {
|
294
|
+
display: inline-block;
|
295
|
+
margin-bottom: 0;
|
296
|
+
vertical-align: middle;
|
450
297
|
}
|
451
|
-
}
|
452
|
-
.add-on {
|
453
|
-
display: inline-block;
|
454
|
-
width: auto;
|
455
|
-
height: $baseLineHeight;
|
456
|
-
min-width: 16px;
|
457
|
-
padding: 4px 5px;
|
458
|
-
font-size: $baseFontSize;
|
459
|
-
font-weight: normal;
|
460
|
-
line-height: $baseLineHeight;
|
461
|
-
text-align: center;
|
462
|
-
text-shadow: 0 1px 0 $white;
|
463
|
-
background-color: $grayLighter;
|
464
|
-
border: 1px solid #ccc;
|
465
|
-
}
|
466
|
-
.add-on,
|
467
|
-
.btn,
|
468
|
-
.btn-group > .dropdown-toggle {
|
469
|
-
vertical-align: top;
|
470
|
-
@include border-radius(0);
|
471
|
-
}
|
472
|
-
.active {
|
473
|
-
background-color: lighten($green, 30);
|
474
|
-
border-color: $green;
|
475
|
-
}
|
476
|
-
}
|
477
298
|
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
margin-right: -1px;
|
482
|
-
}
|
483
|
-
.add-on:first-child,
|
484
|
-
.btn:first-child {
|
485
|
-
// FYI, `.btn:first-child` accounts for a button group that's prepended
|
486
|
-
@include border-radius($inputBorderRadius 0 0 $inputBorderRadius);
|
487
|
-
}
|
488
|
-
}
|
489
|
-
|
490
|
-
.input-append {
|
491
|
-
input,
|
492
|
-
select,
|
493
|
-
.uneditable-input {
|
494
|
-
@include border-radius($inputBorderRadius 0 0 $inputBorderRadius);
|
495
|
-
+ .btn-group .btn:last-child {
|
496
|
-
@include border-radius(0 $inputBorderRadius $inputBorderRadius 0);
|
299
|
+
// In navbar-form, allow folks to *not* use `.form-group`
|
300
|
+
.form-control {
|
301
|
+
display: inline-block;
|
497
302
|
}
|
498
|
-
}
|
499
|
-
.add-on,
|
500
|
-
.btn,
|
501
|
-
.btn-group {
|
502
|
-
margin-left: -1px;
|
503
|
-
}
|
504
|
-
.add-on:last-child,
|
505
|
-
.btn:last-child,
|
506
|
-
.btn-group:last-child > .dropdown-toggle {
|
507
|
-
@include border-radius(0 $inputBorderRadius $inputBorderRadius 0);
|
508
|
-
}
|
509
|
-
}
|
510
303
|
|
511
|
-
// Remove
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
304
|
+
// Remove default margin on radios/checkboxes that were used for stacking, and
|
305
|
+
// then undo the floating of radios and checkboxes to match (which also avoids
|
306
|
+
// a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969).
|
307
|
+
.radio,
|
308
|
+
.checkbox {
|
309
|
+
display: inline-block;
|
310
|
+
margin-top: 0;
|
311
|
+
margin-bottom: 0;
|
312
|
+
padding-left: 0;
|
313
|
+
}
|
314
|
+
.radio input[type="radio"],
|
315
|
+
.checkbox input[type="checkbox"] {
|
316
|
+
float: none;
|
317
|
+
margin-left: 0;
|
519
318
|
}
|
520
|
-
}
|
521
|
-
.add-on:first-child,
|
522
|
-
.btn:first-child {
|
523
|
-
margin-right: -1px;
|
524
|
-
@include border-radius($inputBorderRadius 0 0 $inputBorderRadius);
|
525
|
-
}
|
526
|
-
.add-on:last-child,
|
527
|
-
.btn:last-child {
|
528
|
-
margin-left: -1px;
|
529
|
-
@include border-radius(0 $inputBorderRadius $inputBorderRadius 0);
|
530
|
-
}
|
531
|
-
.btn-group:first-child {
|
532
|
-
margin-left: 0;
|
533
319
|
}
|
534
320
|
}
|
535
321
|
|
536
322
|
|
323
|
+
// Horizontal forms
|
324
|
+
//
|
325
|
+
// Horizontal forms are built on grid classes and allow you to create forms with
|
326
|
+
// labels on the left and inputs on the right.
|
537
327
|
|
538
|
-
|
539
|
-
// SEARCH FORM
|
540
|
-
// -----------
|
541
|
-
|
542
|
-
input.search-query {
|
543
|
-
padding-right: 14px;
|
544
|
-
padding-right: 4px \9;
|
545
|
-
padding-left: 14px;
|
546
|
-
padding-left: 4px \9; /* IE7-8 doesn't have border-radius, so don't indent the padding */
|
547
|
-
margin-bottom: 0; // Remove the default margin on all inputs
|
548
|
-
@include border-radius(15px);
|
549
|
-
}
|
550
|
-
|
551
|
-
/* Allow for input prepend/append in search forms */
|
552
|
-
.form-search .input-append .search-query,
|
553
|
-
.form-search .input-prepend .search-query {
|
554
|
-
@include border-radius(0); // Override due to specificity
|
555
|
-
}
|
556
|
-
.form-search .input-append .search-query {
|
557
|
-
@include border-radius(14px 0 0 14px);
|
558
|
-
}
|
559
|
-
.form-search .input-append .btn {
|
560
|
-
@include border-radius(0 14px 14px 0);
|
561
|
-
}
|
562
|
-
.form-search .input-prepend .search-query {
|
563
|
-
@include border-radius(0 14px 14px 0);
|
564
|
-
}
|
565
|
-
.form-search .input-prepend .btn {
|
566
|
-
@include border-radius(14px 0 0 14px);
|
567
|
-
}
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
// HORIZONTAL & VERTICAL FORMS
|
573
|
-
// ---------------------------
|
574
|
-
|
575
|
-
// Common properties
|
576
|
-
// -----------------
|
577
|
-
|
578
|
-
.form-search,
|
579
|
-
.form-inline,
|
580
328
|
.form-horizontal {
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
.
|
585
|
-
.
|
586
|
-
.
|
587
|
-
.
|
588
|
-
|
589
|
-
@include ie7-inline-block();
|
329
|
+
|
330
|
+
// Consistent vertical alignment of labels, radios, and checkboxes
|
331
|
+
.control-label,
|
332
|
+
.radio,
|
333
|
+
.checkbox,
|
334
|
+
.radio-inline,
|
335
|
+
.checkbox-inline {
|
336
|
+
margin-top: 0;
|
590
337
|
margin-bottom: 0;
|
591
|
-
|
592
|
-
}
|
593
|
-
// Re-hide hidden elements due to specifity
|
594
|
-
.hide {
|
595
|
-
display: none;
|
338
|
+
padding-top: ($padding-base-vertical + 1); // Default padding plus a border
|
596
339
|
}
|
597
|
-
}
|
598
|
-
.form-search label,
|
599
|
-
.form-inline label,
|
600
|
-
.form-search .btn-group,
|
601
|
-
.form-inline .btn-group {
|
602
|
-
display: inline-block;
|
603
|
-
}
|
604
|
-
// Remove margin for input-prepend/-append
|
605
|
-
.form-search .input-append,
|
606
|
-
.form-inline .input-append,
|
607
|
-
.form-search .input-prepend,
|
608
|
-
.form-inline .input-prepend {
|
609
|
-
margin-bottom: 0;
|
610
|
-
}
|
611
|
-
// Inline checkbox/radio labels (remove padding on left)
|
612
|
-
.form-search .radio,
|
613
|
-
.form-search .checkbox,
|
614
|
-
.form-inline .radio,
|
615
|
-
.form-inline .checkbox {
|
616
|
-
padding-left: 0;
|
617
|
-
margin-bottom: 0;
|
618
|
-
vertical-align: middle;
|
619
|
-
}
|
620
|
-
// Remove float and margin, set to inline-block
|
621
|
-
.form-search .radio input[type="radio"],
|
622
|
-
.form-search .checkbox input[type="checkbox"],
|
623
|
-
.form-inline .radio input[type="radio"],
|
624
|
-
.form-inline .checkbox input[type="checkbox"] {
|
625
|
-
float: left;
|
626
|
-
margin-right: 3px;
|
627
|
-
margin-left: 0;
|
628
|
-
}
|
629
|
-
|
630
|
-
|
631
|
-
// Margin to space out fieldsets
|
632
|
-
.control-group {
|
633
|
-
margin-bottom: $baseLineHeight / 2;
|
634
|
-
}
|
635
|
-
|
636
|
-
// Legend collapses margin, so next element is responsible for spacing
|
637
|
-
legend + .control-group {
|
638
|
-
margin-top: $baseLineHeight;
|
639
|
-
-webkit-margin-top-collapse: separate;
|
640
|
-
}
|
641
340
|
|
642
|
-
//
|
643
|
-
|
644
|
-
|
645
|
-
.form-horizontal {
|
646
|
-
// Increase spacing between groups
|
647
|
-
.control-group {
|
648
|
-
margin-bottom: $baseLineHeight;
|
649
|
-
@include clearfix();
|
650
|
-
}
|
651
|
-
// Float the labels left
|
652
|
-
.control-label {
|
653
|
-
float: left;
|
654
|
-
width: $horizontalComponentOffset - 20;
|
655
|
-
padding-top: 5px;
|
656
|
-
text-align: right;
|
657
|
-
}
|
658
|
-
// Move over all input controls and content
|
659
|
-
.controls {
|
660
|
-
// Super jank IE7 fix to ensure the inputs in .input-append and input-prepend
|
661
|
-
// don't inherit the margin of the parent, in this case .controls
|
662
|
-
*display: inline-block;
|
663
|
-
*padding-left: 20px;
|
664
|
-
margin-left: $horizontalComponentOffset;
|
665
|
-
*margin-left: 0;
|
666
|
-
&:first-child {
|
667
|
-
*padding-left: $horizontalComponentOffset;
|
668
|
-
}
|
341
|
+
// Make form groups behave like rows
|
342
|
+
.form-group {
|
343
|
+
@include make-row();
|
669
344
|
}
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
input,
|
676
|
-
select,
|
677
|
-
textarea,
|
678
|
-
.uneditable-input,
|
679
|
-
.input-prepend,
|
680
|
-
.input-append {
|
681
|
-
+ .help-block {
|
682
|
-
margin-top: $baseLineHeight / 2;
|
345
|
+
|
346
|
+
// Only right align form labels here when the columns stop stacking
|
347
|
+
@media (min-width: $screen-tablet) {
|
348
|
+
.control-label {
|
349
|
+
text-align: right;
|
683
350
|
}
|
684
351
|
}
|
685
|
-
// Move over buttons in .form-actions to align with .controls
|
686
|
-
.form-actions {
|
687
|
-
padding-left: $horizontalComponentOffset;
|
688
|
-
}
|
689
352
|
}
|