less-rails-bootstrap 2.0.10 → 2.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. data/CHANGELOG.md +5 -0
  2. data/lib/less/rails/bootstrap/version.rb +1 -1
  3. data/scripts/update_bootstrap.sh +33 -0
  4. data/test/cases/usage_css_spec.rb +2 -2
  5. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  6. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  7. data/vendor/assets/javascripts/twitter/bootstrap/alert.js +28 -32
  8. data/vendor/assets/javascripts/twitter/bootstrap/button.js +29 -33
  9. data/vendor/assets/javascripts/twitter/bootstrap/carousel.js +27 -19
  10. data/vendor/assets/javascripts/twitter/bootstrap/collapse.js +44 -25
  11. data/vendor/assets/javascripts/twitter/bootstrap/dropdown.js +18 -10
  12. data/vendor/assets/javascripts/twitter/bootstrap/modal.js +25 -17
  13. data/vendor/assets/javascripts/twitter/bootstrap/popover.js +13 -10
  14. data/vendor/assets/javascripts/twitter/bootstrap/scrollspy.js +43 -17
  15. data/vendor/assets/javascripts/twitter/bootstrap/tab.js +12 -7
  16. data/vendor/assets/javascripts/twitter/bootstrap/tooltip.js +40 -35
  17. data/vendor/assets/javascripts/twitter/bootstrap/transition.js +30 -20
  18. data/vendor/assets/javascripts/twitter/bootstrap/typeahead.js +25 -11
  19. data/vendor/frameworks/twitter/bootstrap/accordion.less +5 -0
  20. data/vendor/frameworks/twitter/bootstrap/bootstrap.less +2 -3
  21. data/vendor/frameworks/twitter/bootstrap/button-groups.less +55 -36
  22. data/vendor/frameworks/twitter/bootstrap/buttons.less +15 -11
  23. data/vendor/frameworks/twitter/bootstrap/close.less +12 -1
  24. data/vendor/frameworks/twitter/bootstrap/code.less +5 -5
  25. data/vendor/frameworks/twitter/bootstrap/component-animations.less +4 -4
  26. data/vendor/frameworks/twitter/bootstrap/dropdowns.less +15 -20
  27. data/vendor/frameworks/twitter/bootstrap/forms.less +58 -29
  28. data/vendor/frameworks/twitter/bootstrap/grid.less +1 -1
  29. data/vendor/frameworks/twitter/bootstrap/labels-badges.less +55 -0
  30. data/vendor/frameworks/twitter/bootstrap/layouts.less +2 -2
  31. data/vendor/frameworks/twitter/bootstrap/mixins.less +53 -36
  32. data/vendor/frameworks/twitter/bootstrap/modals.less +1 -1
  33. data/vendor/frameworks/twitter/bootstrap/navbar.less +65 -42
  34. data/vendor/frameworks/twitter/bootstrap/navs.less +36 -36
  35. data/vendor/frameworks/twitter/bootstrap/pager.less +1 -1
  36. data/vendor/frameworks/twitter/bootstrap/progress-bars.less +14 -6
  37. data/vendor/frameworks/twitter/bootstrap/reset.less +3 -3
  38. data/vendor/frameworks/twitter/bootstrap/responsive-1200px-min.less +23 -0
  39. data/vendor/frameworks/twitter/bootstrap/responsive-767px-max.less +149 -0
  40. data/vendor/frameworks/twitter/bootstrap/responsive-768px-979px.less +15 -0
  41. data/vendor/frameworks/twitter/bootstrap/responsive-navbar.less +146 -0
  42. data/vendor/frameworks/twitter/bootstrap/responsive-utilities.less +41 -0
  43. data/vendor/frameworks/twitter/bootstrap/responsive.less +14 -337
  44. data/vendor/frameworks/twitter/bootstrap/sprites.less +41 -8
  45. data/vendor/frameworks/twitter/bootstrap/tables.less +22 -5
  46. data/vendor/frameworks/twitter/bootstrap/thumbnails.less +11 -2
  47. data/vendor/frameworks/twitter/bootstrap/type.less +7 -6
  48. data/vendor/frameworks/twitter/bootstrap/variables.less +12 -8
  49. metadata +11 -4
@@ -27,14 +27,14 @@ pre {
27
27
  margin: 0 0 @baseLineHeight / 2;
28
28
  font-size: @baseFontSize * .925; // 13px to 12px
29
29
  line-height: @baseLineHeight;
30
+ word-break: break-all;
31
+ word-wrap: break-word;
32
+ white-space: pre;
33
+ white-space: pre-wrap;
30
34
  background-color: #f5f5f5;
31
35
  border: 1px solid #ccc; // fallback for IE7-8
32
36
  border: 1px solid rgba(0,0,0,.15);
33
37
  .border-radius(4px);
34
- white-space: pre;
35
- white-space: pre-wrap;
36
- word-break: break-all;
37
- word-wrap: break-word;
38
38
 
39
39
  // Make prettyprint styles more spaced out for readability
40
40
  &.prettyprint {
@@ -54,4 +54,4 @@ pre {
54
54
  .pre-scrollable {
55
55
  max-height: 340px;
56
56
  overflow-y: scroll;
57
- }
57
+ }
@@ -2,19 +2,19 @@
2
2
  // --------------------
3
3
 
4
4
  .fade {
5
- .transition(opacity .15s linear);
6
5
  opacity: 0;
6
+ .transition(opacity .15s linear);
7
7
  &.in {
8
8
  opacity: 1;
9
9
  }
10
10
  }
11
11
 
12
12
  .collapse {
13
- .transition(height .35s ease);
14
13
  position:relative;
15
- overflow:hidden;
16
14
  height: 0;
15
+ overflow:hidden;
16
+ .transition(height .35s ease);
17
17
  &.in {
18
18
  height: auto;
19
19
  }
20
- }
20
+ }
@@ -2,6 +2,7 @@
2
2
  // --------------
3
3
 
4
4
  // Use the .menu class on any <li> element within the topbar or ul.tabs and you'll get some superfancy dropdowns
5
+ .dropup,
5
6
  .dropdown {
6
7
  position: relative;
7
8
  }
@@ -21,11 +22,11 @@
21
22
  width: 0;
22
23
  height: 0;
23
24
  vertical-align: top;
24
- border-left: 4px solid transparent;
25
- border-right: 4px solid transparent;
26
25
  border-top: 4px solid @black;
27
- .opacity(30);
26
+ border-right: 4px solid transparent;
27
+ border-left: 4px solid transparent;
28
28
  content: "";
29
+ .opacity(30);
29
30
  }
30
31
 
31
32
  // Place the caret
@@ -34,7 +35,7 @@
34
35
  margin-left: 2px;
35
36
  }
36
37
  .dropdown:hover .caret,
37
- .open.dropdown .caret {
38
+ .open .caret {
38
39
  .opacity(100);
39
40
  }
40
41
 
@@ -45,24 +46,22 @@
45
46
  top: 100%;
46
47
  left: 0;
47
48
  z-index: @zindexDropdown;
48
- float: left;
49
49
  display: none; // none by default, but block on "open" of the menu
50
+ float: left;
50
51
  min-width: 160px;
51
52
  padding: 4px 0;
52
- margin: 0; // override default ul
53
+ margin: 1px 0 0; // override default ul
53
54
  list-style: none;
54
55
  background-color: @dropdownBackground;
55
- border-color: #ccc;
56
- border-color: rgba(0,0,0,.2);
57
- border-style: solid;
58
- border-width: 1px;
59
- .border-radius(0 0 5px 5px);
56
+ border: 1px solid #ccc;
57
+ border: 1px solid rgba(0,0,0,.2);
58
+ *border-right-width: 2px;
59
+ *border-bottom-width: 2px;
60
+ .border-radius(5px);
60
61
  .box-shadow(0 5px 10px rgba(0,0,0,.2));
61
62
  -webkit-background-clip: padding-box;
62
63
  -moz-background-clip: padding;
63
64
  background-clip: padding-box;
64
- *border-right-width: 2px;
65
- *border-bottom-width: 2px;
66
65
 
67
66
  // Aligns the dropdown menu to right
68
67
  &.pull-right {
@@ -99,25 +98,21 @@
99
98
 
100
99
  // Open state for the dropdown
101
100
  // ---------------------------
102
- .dropdown.open {
101
+ .open {
103
102
  // IE7's z-index only goes to the nearest positioned ancestor, which would
104
103
  // make the menu appear below buttons that appeared later on the page
105
104
  *z-index: @zindexDropdown;
106
105
 
107
- .dropdown-toggle {
108
- color: @white;
109
- background: #ccc;
110
- background: rgba(0,0,0,.3);
111
- }
112
106
  .dropdown-menu {
113
107
  display: block;
114
108
  }
115
109
  }
116
110
 
117
111
  // Right aligned dropdowns
112
+ // ---------------------------
118
113
  .pull-right .dropdown-menu {
119
- left: auto;
120
114
  right: 0;
115
+ left: auto;
121
116
  }
122
117
 
123
118
  // Allow for dropdowns to go bottom up (aka, dropup-menu)
@@ -71,8 +71,9 @@ select,
71
71
  font-size: @baseFontSize;
72
72
  line-height: @baseLineHeight;
73
73
  color: @gray;
74
+ background-color: @inputBackground;
74
75
  border: 1px solid @inputBorder;
75
- .border-radius(3px);
76
+ .border-radius(@inputBorderRadius);
76
77
  }
77
78
  .uneditable-textarea {
78
79
  width: auto;
@@ -97,8 +98,9 @@ input[type="radio"] {
97
98
  *margin-top: 0; /* IE7 */
98
99
  line-height: normal;
99
100
  cursor: pointer;
100
- .border-radius(0);
101
+ background-color: transparent;
101
102
  border: 0 \9; /* IE9 and down */
103
+ .border-radius(0);
102
104
  }
103
105
  input[type="image"] {
104
106
  border: 0;
@@ -109,9 +111,9 @@ input[type="file"] {
109
111
  width: auto;
110
112
  padding: initial;
111
113
  line-height: initial;
112
- border: initial;
113
114
  background-color: @inputBackground;
114
115
  background-color: initial;
116
+ border: initial;
115
117
  .box-shadow(none);
116
118
  }
117
119
 
@@ -171,6 +173,7 @@ input[type="hidden"] {
171
173
  // Indent the labels to position radios/checkboxes as hanging
172
174
  .radio,
173
175
  .checkbox {
176
+ min-height: 18px; // clear the floating input if there is no label text
174
177
  padding-left: 18px;
175
178
  }
176
179
  .radio input[type="radio"],
@@ -213,17 +216,16 @@ textarea {
213
216
  input:focus,
214
217
  textarea:focus {
215
218
  border-color: rgba(82,168,236,.8);
216
- @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
217
- .box-shadow(@shadow);
218
219
  outline: 0;
219
220
  outline: thin dotted \9; /* IE6-9 */
221
+ .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)");
220
222
  }
221
223
  input[type="file"]:focus,
222
224
  input[type="radio"]:focus,
223
225
  input[type="checkbox"]:focus,
224
226
  select:focus {
225
- .box-shadow(none); // override for file inputs
226
227
  .tab-focus();
228
+ .box-shadow(none); // override for file inputs
227
229
  }
228
230
 
229
231
 
@@ -243,7 +245,12 @@ select:focus {
243
245
  input[class*="span"],
244
246
  select[class*="span"],
245
247
  textarea[class*="span"],
246
- .uneditable-input {
248
+ .uneditable-input[class*="span"],
249
+ // Redeclare since the fluid row class is more specific
250
+ .row-fluid input[class*="span"],
251
+ .row-fluid select[class*="span"],
252
+ .row-fluid textarea[class*="span"],
253
+ .row-fluid .uneditable-input[class*="span"] {
247
254
  float: none;
248
255
  margin-left: 0;
249
256
  }
@@ -268,9 +275,16 @@ textarea[disabled],
268
275
  input[readonly],
269
276
  select[readonly],
270
277
  textarea[readonly] {
278
+ cursor: not-allowed;
271
279
  background-color: @inputDisabledBackground;
272
280
  border-color: #ddd;
273
- cursor: not-allowed;
281
+ }
282
+ // Explicitly reset the colors here
283
+ input[type="radio"][disabled],
284
+ input[type="checkbox"][disabled],
285
+ input[type="radio"][readonly],
286
+ input[type="checkbox"][readonly] {
287
+ background-color: transparent;
274
288
  }
275
289
 
276
290
 
@@ -314,18 +328,19 @@ select:focus:required:invalid {
314
328
  padding: (@baseLineHeight - 1) 20px @baseLineHeight;
315
329
  margin-top: @baseLineHeight;
316
330
  margin-bottom: @baseLineHeight;
317
- background-color: @grayLighter;
331
+ background-color: @formActionsBackground;
318
332
  border-top: 1px solid #ddd;
319
333
  .clearfix(); // Adding clearfix to allow for .pull-right button containers
320
334
  }
321
335
 
322
336
  // For text that needs to appear as an input but should not be an input
323
337
  .uneditable-input {
324
- display: block;
338
+ overflow: hidden; // prevent text from wrapping, but still cut it off like an input does
339
+ white-space: nowrap;
340
+ cursor: not-allowed;
325
341
  background-color: @inputBackground;
326
342
  border-color: #eee;
327
343
  .box-shadow(inset 0 1px 2px rgba(0,0,0,.025));
328
- cursor: not-allowed;
329
344
  }
330
345
 
331
346
  // Placeholder text gets special styles; can't be bundled together though for some reason
@@ -365,10 +380,13 @@ select:focus:required:invalid {
365
380
  input,
366
381
  select,
367
382
  .uneditable-input {
383
+ 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
384
+ margin-bottom: 0; // prevent bottom margin from screwing up alignment in stacked forms
368
385
  *margin-left: 0;
369
- .border-radius(0 3px 3px 0);
386
+ vertical-align: middle;
387
+ .border-radius(0 @inputBorderRadius @inputBorderRadius 0);
388
+ // Make input on top when focused so blue border and shadow always show
370
389
  &:focus {
371
- position: relative;
372
390
  z-index: 2;
373
391
  }
374
392
  }
@@ -378,8 +396,8 @@ select:focus:required:invalid {
378
396
  .add-on {
379
397
  display: inline-block;
380
398
  width: auto;
381
- min-width: 16px;
382
399
  height: @baseLineHeight;
400
+ min-width: 16px;
383
401
  padding: 4px 5px;
384
402
  font-weight: normal;
385
403
  line-height: @baseLineHeight;
@@ -391,7 +409,8 @@ select:focus:required:invalid {
391
409
  }
392
410
  .add-on,
393
411
  .btn {
394
- .border-radius(3px 0 0 3px);
412
+ margin-left: -1px;
413
+ .border-radius(0);
395
414
  }
396
415
  .active {
397
416
  background-color: lighten(@green, 30);
@@ -403,21 +422,24 @@ select:focus:required:invalid {
403
422
  .btn {
404
423
  margin-right: -1px;
405
424
  }
425
+ .add-on:first-child,
426
+ .btn:first-child {
427
+ .border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
428
+ }
406
429
  }
407
430
  .input-append {
408
431
  input,
409
- select
432
+ select,
410
433
  .uneditable-input {
411
- .border-radius(3px 0 0 3px);
434
+ .border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
412
435
  }
413
436
  .uneditable-input {
414
- border-left-color: #eee;
415
437
  border-right-color: #ccc;
438
+ border-left-color: #eee;
416
439
  }
417
- .add-on,
418
- .btn {
419
- margin-left: -1px;
420
- .border-radius(0 3px 3px 0);
440
+ .add-on:last-child,
441
+ .btn:last-child {
442
+ .border-radius(0 @inputBorderRadius @inputBorderRadius 0);
421
443
  }
422
444
  }
423
445
  // Remove all border-radius for inputs with both prepend and append
@@ -430,12 +452,12 @@ select:focus:required:invalid {
430
452
  .add-on:first-child,
431
453
  .btn:first-child {
432
454
  margin-right: -1px;
433
- .border-radius(3px 0 0 3px);
455
+ .border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
434
456
  }
435
457
  .add-on:last-child,
436
458
  .btn:last-child {
437
459
  margin-left: -1px;
438
- .border-radius(0 3px 3px 0);
460
+ .border-radius(0 @inputBorderRadius @inputBorderRadius 0);
439
461
  }
440
462
  }
441
463
 
@@ -445,8 +467,10 @@ select:focus:required:invalid {
445
467
  // -----------
446
468
 
447
469
  .search-query {
448
- padding-left: 14px;
449
470
  padding-right: 14px;
471
+ padding-right: 4px \9;
472
+ padding-left: 14px;
473
+ padding-left: 4px \9; /* IE7-8 doesn't have border-radius, so don't indent the padding */
450
474
  margin-bottom: 0; // remove the default margin on all inputs
451
475
  .border-radius(14px);
452
476
  }
@@ -470,6 +494,7 @@ select:focus:required:invalid {
470
494
  .input-prepend,
471
495
  .input-append {
472
496
  display: inline-block;
497
+ .ie7-inline-block();
473
498
  margin-bottom: 0;
474
499
  }
475
500
  // Re-hide hidden elements due to specifity
@@ -503,8 +528,8 @@ select:focus:required:invalid {
503
528
  .form-inline .radio input[type="radio"],
504
529
  .form-inline .checkbox input[type="checkbox"] {
505
530
  float: left;
506
- margin-left: 0;
507
531
  margin-right: 3px;
532
+ margin-left: 0;
508
533
  }
509
534
 
510
535
 
@@ -537,11 +562,15 @@ legend + .control-group {
537
562
  }
538
563
  // Move over all input controls and content
539
564
  .controls {
540
- margin-left: 160px;
541
- /* Super jank IE7 fix to ensure the inputs in .input-append and input-prepend don't inherit the margin of the parent, in this case .controls */
565
+ // Super jank IE7 fix to ensure the inputs in .input-append and input-prepend
566
+ // don't inherit the margin of the parent, in this case .controls
542
567
  *display: inline-block;
543
- *margin-left: 0;
544
568
  *padding-left: 20px;
569
+ margin-left: 160px;
570
+ *margin-left: 0;
571
+ &:first-child {
572
+ *padding-left: 160px;
573
+ }
545
574
  }
546
575
  // Remove bottom margin on block level help text since that's accounted for on .control-group
547
576
  .help-block {
@@ -2,4 +2,4 @@
2
2
  #grid > .core(@gridColumnWidth, @gridGutterWidth);
3
3
 
4
4
  // Fluid (940px)
5
- #grid > .fluid(@fluidGridColumnWidth, @fluidGridGutterWidth);
5
+ #grid > .fluid(@fluidGridColumnWidth, @fluidGridGutterWidth);
@@ -0,0 +1,55 @@
1
+ // LABELS & BADGES
2
+ // ---------------
3
+
4
+ // Base classes
5
+ .label,
6
+ .badge {
7
+ font-size: @baseFontSize * .846;
8
+ font-weight: bold;
9
+ line-height: 14px; // ensure proper line-height if floated
10
+ color: @white;
11
+ vertical-align: baseline;
12
+ white-space: nowrap;
13
+ text-shadow: 0 -1px 0 rgba(0,0,0,.25);
14
+ background-color: @grayLight;
15
+ }
16
+ // Set unique padding and border-radii
17
+ .label {
18
+ padding: 1px 4px 2px;
19
+ .border-radius(3px);
20
+ }
21
+ .badge {
22
+ padding: 1px 9px 2px;
23
+ .border-radius(9px);
24
+ }
25
+
26
+ // Hover state, but only for links
27
+ a {
28
+ &.label:hover,
29
+ &.badge:hover {
30
+ color: @white;
31
+ text-decoration: none;
32
+ cursor: pointer;
33
+ }
34
+ }
35
+
36
+ // Colors
37
+ // Only give background-color difference to links (and to simplify, we don't qualifty with `a` but [href] attribute)
38
+ .label,
39
+ .badge {
40
+ // Important (red)
41
+ &-important { background-color: @errorText; }
42
+ &-important[href] { background-color: darken(@errorText, 10%); }
43
+ // Warnings (orange)
44
+ &-warning { background-color: @orange; }
45
+ &-warning[href] { background-color: darken(@orange, 10%); }
46
+ // Success (green)
47
+ &-success { background-color: @successText; }
48
+ &-success[href] { background-color: darken(@successText, 10%); }
49
+ // Info (turquoise)
50
+ &-info { background-color: @infoText; }
51
+ &-info[href] { background-color: darken(@infoText, 10%); }
52
+ // Inverse (black)
53
+ &-inverse { background-color: @grayDark; }
54
+ &-inverse[href] { background-color: darken(@grayDark, 10%); }
55
+ }
@@ -11,7 +11,7 @@
11
11
 
12
12
  // Fluid layouts (left aligned, with sidebar, min- & max-width content)
13
13
  .container-fluid {
14
- padding-left: @gridGutterWidth;
15
14
  padding-right: @gridGutterWidth;
15
+ padding-left: @gridGutterWidth;
16
16
  .clearfix();
17
- }
17
+ }