bootstrap-sass 2.0.0 → 2.0.1

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.

Files changed (36) hide show
  1. data/README.md +4 -1
  2. data/vendor/assets/javascripts/bootstrap-alert.js +8 -5
  3. data/vendor/assets/javascripts/bootstrap-button.js +3 -3
  4. data/vendor/assets/javascripts/bootstrap-carousel.js +5 -2
  5. data/vendor/assets/javascripts/bootstrap-collapse.js +2 -2
  6. data/vendor/assets/javascripts/bootstrap-dropdown.js +2 -2
  7. data/vendor/assets/javascripts/bootstrap-modal.js +6 -5
  8. data/vendor/assets/javascripts/bootstrap-popover.js +2 -2
  9. data/vendor/assets/javascripts/bootstrap-scrollspy.js +2 -2
  10. data/vendor/assets/javascripts/bootstrap-tab.js +2 -2
  11. data/vendor/assets/javascripts/bootstrap-tooltip.js +2 -2
  12. data/vendor/assets/javascripts/bootstrap-transition.js +3 -3
  13. data/vendor/assets/javascripts/bootstrap-typeahead.js +2 -2
  14. data/vendor/assets/stylesheets/_bootstrap-responsive.scss +9 -5
  15. data/vendor/assets/stylesheets/_bootstrap.scss +1 -1
  16. data/vendor/assets/stylesheets/bootstrap/_breadcrumbs.scss +1 -1
  17. data/vendor/assets/stylesheets/bootstrap/_button-groups.scss +4 -4
  18. data/vendor/assets/stylesheets/bootstrap/_buttons.scss +23 -9
  19. data/vendor/assets/stylesheets/bootstrap/_carousel.scss +3 -3
  20. data/vendor/assets/stylesheets/bootstrap/_close.scss +3 -3
  21. data/vendor/assets/stylesheets/bootstrap/_code.scss +13 -0
  22. data/vendor/assets/stylesheets/bootstrap/_dropdowns.scss +4 -5
  23. data/vendor/assets/stylesheets/bootstrap/_forms.scss +42 -37
  24. data/vendor/assets/stylesheets/bootstrap/_labels.scss +23 -7
  25. data/vendor/assets/stylesheets/bootstrap/_mixins.scss +62 -11
  26. data/vendor/assets/stylesheets/bootstrap/_modals.scss +13 -2
  27. data/vendor/assets/stylesheets/bootstrap/_navbar.scss +12 -6
  28. data/vendor/assets/stylesheets/bootstrap/_navs.scss +24 -15
  29. data/vendor/assets/stylesheets/bootstrap/_reset.scss +1 -1
  30. data/vendor/assets/stylesheets/bootstrap/_sprites.scss +4 -3
  31. data/vendor/assets/stylesheets/bootstrap/_tables.scss +12 -3
  32. data/vendor/assets/stylesheets/bootstrap/_thumbnails.scss +2 -2
  33. data/vendor/assets/stylesheets/bootstrap/_tooltip.scss +2 -2
  34. data/vendor/assets/stylesheets/bootstrap/_type.scss +2 -2
  35. data/vendor/assets/stylesheets/bootstrap/_variables.scss +6 -2
  36. metadata +7 -7
@@ -8,11 +8,11 @@
8
8
  line-height: $baseLineHeight;
9
9
  color: $black;
10
10
  text-shadow: 0 1px 0 rgba(255,255,255,1);
11
- @include opacity(20);
11
+ @include opacity(0.2);
12
12
  &:hover {
13
13
  color: $black;
14
14
  text-decoration: none;
15
- @include opacity(40);
15
+ @include opacity(0.4);
16
16
  cursor: pointer;
17
17
  }
18
- }
18
+ }
@@ -10,12 +10,16 @@ code, pre {
10
10
  color: $grayDark;
11
11
  @include border-radius(3px);
12
12
  }
13
+
14
+ // Inline code
13
15
  code {
14
16
  padding: 3px 4px;
15
17
  color: #d14;
16
18
  background-color: #f7f7f9;
17
19
  border: 1px solid #e1e1e8;
18
20
  }
21
+
22
+ // Blocks of code
19
23
  pre {
20
24
  display: block;
21
25
  padding: ($baseLineHeight - 1) / 2;
@@ -29,6 +33,7 @@ pre {
29
33
  white-space: pre;
30
34
  white-space: pre-wrap;
31
35
  word-break: break-all;
36
+ word-wrap: break-word;
32
37
 
33
38
  // Make prettyprint styles more spaced out for readability
34
39
  &.prettyprint {
@@ -38,6 +43,14 @@ pre {
38
43
  // Account for some code outputs that place code tags in pre tags
39
44
  code {
40
45
  padding: 0;
46
+ color: inherit;
41
47
  background-color: transparent;
48
+ border: 0;
42
49
  }
50
+ }
51
+
52
+ // Enable scrollable blocks of code
53
+ .pre-scrollable {
54
+ max-height: 340px;
55
+ overflow-y: scroll;
43
56
  }
@@ -25,7 +25,7 @@
25
25
  border-left: 4px solid transparent;
26
26
  border-right: 4px solid transparent;
27
27
  border-top: 4px solid $black;
28
- @include opacity(30);
28
+ @include opacity(0.3);
29
29
  content: "\2193";
30
30
  }
31
31
  .dropdown .caret {
@@ -33,7 +33,7 @@
33
33
  margin-left: 2px;
34
34
  }
35
35
  .dropdown:hover .caret, .open.dropdown .caret {
36
- @include opacity(100);
36
+ @include opacity(1);
37
37
  }
38
38
  // The dropdown menu (ul)
39
39
  .dropdown-menu {
@@ -44,7 +44,6 @@
44
44
  float: left;
45
45
  display: none; // none by default, but block on "open" of the menu
46
46
  min-width: 160px;
47
- max-width: 220px;
48
47
  _width: 160px;
49
48
  padding: 4px 0;
50
49
  margin: 0; // override default ul
@@ -91,7 +90,7 @@
91
90
  padding: 3px 15px;
92
91
  clear: both;
93
92
  font-weight: normal;
94
- line-height: 18px;
93
+ line-height: $baseLineHeight;
95
94
  color: $gray;
96
95
  white-space: nowrap;
97
96
  }
@@ -124,4 +123,4 @@
124
123
  .typeahead {
125
124
  margin-top: 2px; // give it some space to breathe
126
125
  @include border-radius(4px);
127
- }
126
+ }
@@ -28,11 +28,21 @@ legend {
28
28
  color: $grayDark;
29
29
  border: 0;
30
30
  border-bottom: 1px solid #eee;
31
+
32
+ // Small
33
+ small {
34
+ font-size: $baseLineHeight * .75;
35
+ color: $grayLight;
36
+ }
31
37
  }
32
38
 
33
39
  // Set font for forms
34
40
  label, input, button, select, textarea {
35
- @include font-sans-serif($baseFontSize, normal, $baseLineHeight);
41
+ @include font-shorthand($baseFontSize, normal, $baseLineHeight); // Set size, weight, line-height here
42
+ }
43
+
44
+ input, button, select, textarea {
45
+ @include font-family-sans-serif(); // And only set font-family here for those that need it (note the missing label element)
36
46
  }
37
47
 
38
48
  // Identify controls by their labels
@@ -73,13 +83,17 @@ input[type="image"], input[type="checkbox"], input[type="radio"] {
73
83
  margin: 3px 0;
74
84
  *margin-top: 0; /* IE7 */
75
85
  line-height: normal;
76
- border: 0;
77
86
  cursor: pointer;
78
87
  @include border-radius(0);
88
+ border: 0 \9; /* IE9 and down */
89
+ }
90
+ input[type="image"] {
91
+ border: 0;
79
92
  }
80
93
 
81
94
  // Reset the file input to browser defaults
82
95
  input[type="file"] {
96
+ width: auto;
83
97
  padding: initial;
84
98
  line-height: initial;
85
99
  border: initial;
@@ -101,6 +115,11 @@ select, input[type="file"] {
101
115
  line-height: 28px;
102
116
  }
103
117
 
118
+ // Reset line-height for IE
119
+ input[type="file"] {
120
+ line-height: 18px \9;
121
+ }
122
+
104
123
  // Chrome on Linux and Mobile Safari need background-color
105
124
  select {
106
125
  width: 220px; // default input width + 10px of padding that doesn't get applied
@@ -147,18 +166,16 @@ input[type="hidden"] {
147
166
  }
148
167
 
149
168
  // Radios and checkboxes on same line
169
+ // TODO v3: Convert .inline to .control-inline
150
170
  .radio.inline, .checkbox.inline {
151
171
  display: inline-block;
172
+ padding-top: 5px;
152
173
  margin-bottom: 0;
153
174
  vertical-align: middle;
154
175
  }
155
176
  .radio.inline + .radio.inline, .checkbox.inline + .checkbox.inline {
156
177
  margin-left: 10px; // space out consecutive inline controls
157
178
  }
158
- // But don't forget to remove their padding on first-child
159
- .controls > .radio.inline:first-child, .controls > .checkbox.inline:first-child {
160
- padding-top: 0;
161
- }
162
179
 
163
180
 
164
181
 
@@ -175,9 +192,9 @@ input:focus, textarea:focus {
175
192
  $shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
176
193
  @include box-shadow($shadow);
177
194
  outline: 0;
178
- outline: thin dotted \9; /* IE6-8 */
195
+ outline: thin dotted \9; /* IE6-9 */
179
196
  }
180
- input[type="file"]:focus, input[type="checkbox"]:focus, select:focus {
197
+ input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus, select:focus {
181
198
  @include box-shadow(none); // override for file inputs
182
199
  @include tab-focus();
183
200
  }
@@ -227,28 +244,6 @@ input[disabled], select[disabled], textarea[disabled], input[readonly], select[r
227
244
  // FORM FIELD FEEDBACK STATES
228
245
  // --------------------------
229
246
 
230
- // Mixin for form field states
231
- @mixin formFieldState($textColor: #555, $borderColor: #ccc, $backgroundColor: #f5f5f5) {
232
- // Set the text color
233
- > label, .help-block, .help-inline {
234
- color: $textColor;
235
- }
236
- // Style inputs accordingly
237
- input, select, textarea {
238
- color: $textColor;
239
- border-color: $borderColor;
240
- &:focus {
241
- border-color: darken($borderColor, 10%);
242
- @include box-shadow(0 0 6px lighten($borderColor, 20%));
243
- }
244
- }
245
- // Give a small background color for input-prepend/-append
246
- .input-prepend .add-on, .input-append .add-on {
247
- color: $textColor;
248
- background-color: $backgroundColor;
249
- border-color: $textColor;
250
- }
251
- }
252
247
  // Warning
253
248
  .control-group.warning {
254
249
  @include formFieldState($warningText, $warningText, $warningBackground);
@@ -304,6 +299,7 @@ input:focus:required:invalid, textarea:focus:required:invalid, select:focus:requ
304
299
  // ---------
305
300
 
306
301
  .help-block {
302
+ display: block; // account for any element using help-block
307
303
  margin-top: 5px;
308
304
  margin-bottom: 0;
309
305
  color: $grayLight;
@@ -334,7 +330,8 @@ input:focus:required:invalid, textarea:focus:required:invalid, select:focus:requ
334
330
  }
335
331
  }
336
332
  .uneditable-input {
337
- border-left-color: #ccc;
333
+ border-left-color: #eee;
334
+ border-right-color: #ccc;
338
335
  }
339
336
  .add-on {
340
337
  float: left;
@@ -412,6 +409,8 @@ input:focus:required:invalid, textarea:focus:required:invalid, select:focus:requ
412
409
  display: inline-block;
413
410
  margin-bottom: 0;
414
411
  }
412
+ // Re-hide elemnts due to specifity
413
+ .hide { display: none; }
415
414
  }
416
415
  .form-search label, .form-inline label, .form-search .input-append, .form-inline .input-append, .form-search .input-prepend, .form-inline .input-prepend {
417
416
  display: inline-block;
@@ -420,28 +419,34 @@ input:focus:required:invalid, textarea:focus:required:invalid, select:focus:requ
420
419
  .form-search .input-append .add-on, .form-inline .input-prepend .add-on, .form-search .input-append .add-on, .form-inline .input-prepend .add-on {
421
420
  vertical-align: middle;
422
421
  }
422
+ // Inline checkbox/radio labels
423
+ .form-search .radio, .form-inline .radio, .form-search .checkbox, .form-inline .checkbox {
424
+ margin-bottom: 0;
425
+ vertical-align: middle;
426
+ }
423
427
 
424
428
  // Margin to space out fieldsets
425
429
  .control-group {
426
430
  margin-bottom: $baseLineHeight / 2;
427
431
  }
428
432
 
433
+ // Legend collapses margin, so next elements is responsible for spacing
434
+ legend + .control-group {
435
+ margin-top: $baseLineHeight;
436
+ -webkit-margin-top-collapse: separate;
437
+ }
438
+
429
439
  // Horizontal-specific styles
430
440
  // --------------------------
431
441
 
432
442
  .form-horizontal {
433
- // Legend collapses margin, so we're relegated to padding
434
- legend + .control-group {
435
- margin-top: $baseLineHeight;
436
- -webkit-margin-top-collapse: separate;
437
- }
438
443
  // Increase spacing between groups
439
444
  .control-group {
440
445
  margin-bottom: $baseLineHeight;
441
446
  @include clearfix();
442
447
  }
443
448
  // Float the labels left
444
- .control-group > label {
449
+ .control-label {
445
450
  float: left;
446
451
  width: 140px;
447
452
  padding-top: 5px;
@@ -1,16 +1,32 @@
1
1
  // LABELS
2
2
  // ------
3
3
 
4
+ // Base
4
5
  .label {
5
- padding: 1px 3px 2px;
6
- font-size: $baseFontSize * .75;
6
+ padding: 2px 4px 3px;
7
+ font-size: $baseFontSize * .85;
7
8
  font-weight: bold;
8
9
  color: $white;
9
- text-transform: uppercase;
10
+ text-shadow: 0 -1px 0 rgba(0,0,0,.25);
10
11
  background-color: $grayLight;
11
12
  @include border-radius(3px);
12
13
  }
13
- .label-important { background-color: $errorText; }
14
- .label-warning { background-color: $orange; }
15
- .label-success { background-color: $successText; }
16
- .label-info { background-color: $infoText; }
14
+
15
+ // Hover state
16
+ .label:hover {
17
+ color: $white;
18
+ text-decoration: none;
19
+ }
20
+
21
+ // Colors
22
+ .label-important { background-color: $errorText; }
23
+ .label-important:hover { background-color: darken($errorText, 10%); }
24
+
25
+ .label-warning { background-color: $orange; }
26
+ .label-warning:hover { background-color: darken($orange, 10%); }
27
+
28
+ .label-success { background-color: $successText; }
29
+ .label-success:hover { background-color: darken($successText, 10%); }
30
+
31
+ .label-info { background-color: $infoText; }
32
+ .label-info:hover { background-color: darken($infoText, 10%); }
@@ -20,12 +20,13 @@
20
20
  clear: both;
21
21
  }
22
22
  }
23
+ .clearfix { @include clearfix(); }
23
24
 
24
25
  // Webkit-style focus
25
26
  // ------------------
26
27
  @mixin tab-focus() {
27
28
  // Default
28
- outline: thin dotted;
29
+ outline: thin dotted #333;
29
30
  // Webkit
30
31
  outline: 5px auto -webkit-focus-ring-color;
31
32
  outline-offset: -2px;
@@ -89,6 +90,13 @@
89
90
  }
90
91
  }
91
92
 
93
+ // Text overflow
94
+ // ------------------------
95
+ @mixin text-overflow() {
96
+ overflow: hidden;
97
+ text-overflow: ellipsis;
98
+ white-space: nowrap;
99
+ }
92
100
 
93
101
 
94
102
  // FONTS
@@ -140,7 +148,7 @@
140
148
  // Setup the mixins to be used
141
149
  @mixin gridSystemColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, $columns) {
142
150
  width: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns - 1));
143
- }
151
+ }
144
152
  @mixin gridSystemOffset($gridColumnWidth, $gridGutterWidth, $columns) {
145
153
  margin-left: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns - 1)) + ($gridGutterWidth * 2);
146
154
  }
@@ -196,13 +204,11 @@
196
204
  }
197
205
  // Default columns
198
206
  @for $i from 1 through $gridColumns {
199
- .span#{$i} { @include fluidGridSystemColumns($fluidGridGutterWidth, $fluidGridColumnWidth, $i); }
207
+ > .span#{$i} { @include fluidGridSystemColumns($fluidGridGutterWidth, $fluidGridColumnWidth, $i); }
200
208
  }
201
209
  }
202
210
  }
203
211
 
204
-
205
-
206
212
  // Input grid system
207
213
  // -------------------------
208
214
  @mixin inputGridSystemInputColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, $columns) {
@@ -216,6 +222,45 @@
216
222
  }
217
223
  }
218
224
 
225
+ // Make a grid
226
+ // -------------------------
227
+ // Use makeRow() and makeColumn() to assign semantic layouts grid system behaviour
228
+ @mixin makeRow() {
229
+ margin-left: $gridGutterWidth * -1;
230
+ @include clearfix();
231
+ }
232
+ @mixin makeColumn($columns: 1) {
233
+ float: left;
234
+ margin-left: $gridGutterWidth;
235
+ width: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns - 1));
236
+ }
237
+
238
+
239
+ // Form field states (used in forms.less)
240
+ // --------------------------------------------------
241
+
242
+ // Mixin for form field states
243
+ @mixin formFieldState($textColor: #555, $borderColor: #ccc, $backgroundColor: #f5f5f5) {
244
+ // Set the text color
245
+ > label, .help-block, .help-inline {
246
+ color: $textColor;
247
+ }
248
+ // Style inputs accordingly
249
+ input, select, textarea {
250
+ color: $textColor;
251
+ border-color: $borderColor;
252
+ &:focus {
253
+ border-color: darken($borderColor, 10%);
254
+ @include box-shadow(0 0 6px lighten($borderColor, 20%));
255
+ }
256
+ }
257
+ // Give a small background color for input-prepend/-append
258
+ .input-prepend .add-on, .input-append .add-on {
259
+ color: $textColor;
260
+ background-color: $backgroundColor;
261
+ border-color: $textColor;
262
+ }
263
+ }
219
264
 
220
265
 
221
266
  // CSS3 PROPERTIES
@@ -267,8 +312,6 @@
267
312
  transform: translate($x, $y);
268
313
  }
269
314
 
270
- // Removed duplicate mixin # TM.
271
-
272
315
  @mixin skew($x: 0, $y: 0) {
273
316
  -webkit-transform: skew($x, $y);
274
317
  -moz-transform: skew($x, $y);
@@ -277,6 +320,14 @@
277
320
  transform: skew($x, $y);
278
321
  }
279
322
 
323
+ @mixin translate3d($x: 0, $y: 0, $z: 0) {
324
+ -webkit-transform: translate($x, $y, $z);
325
+ -moz-transform: translate($x, $y, $z);
326
+ -ms-transform: translate($x, $y, $z);
327
+ -o-transform: translate($x, $y, $z);
328
+ transform: translate($x, $y, $z);
329
+ }
330
+
280
331
  // Background clipping
281
332
  // Heads up: FF 3.6 and under need "padding" instead of "padding-box"
282
333
  @mixin background-clip($clip) {
@@ -327,9 +378,9 @@
327
378
  }
328
379
 
329
380
  // Opacity
330
- @mixin opacity($opacity: 100) {
331
- opacity: $opacity / 100;
332
- filter: alpha(opacity=$opacity);
381
+ @mixin opacity($opacity: 1) {
382
+ opacity: $opacity;
383
+ filter: alpha(opacity=$opacity * 100);
333
384
  }
334
385
 
335
386
 
@@ -476,4 +527,4 @@
476
527
  border-top: $arrowWidth solid transparent;
477
528
  border-bottom: $arrowWidth solid transparent;
478
529
  border-right: $arrowWidth solid $black;
479
- }
530
+ }