less-rails-bootstrap 2.1.1 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/CHANGELOG.md +5 -0
  2. data/lib/less/rails/bootstrap/version.rb +1 -1
  3. data/scripts/update_bootstrap.sh +1 -1
  4. data/vendor/assets/javascripts/twitter/bootstrap/affix.js +4 -2
  5. data/vendor/assets/javascripts/twitter/bootstrap/alert.js +2 -4
  6. data/vendor/assets/javascripts/twitter/bootstrap/button.js +5 -7
  7. data/vendor/assets/javascripts/twitter/bootstrap/carousel.js +12 -12
  8. data/vendor/assets/javascripts/twitter/bootstrap/collapse.js +9 -11
  9. data/vendor/assets/javascripts/twitter/bootstrap/dropdown.js +9 -11
  10. data/vendor/assets/javascripts/twitter/bootstrap/modal.js +20 -25
  11. data/vendor/assets/javascripts/twitter/bootstrap/popover.js +1 -1
  12. data/vendor/assets/javascripts/twitter/bootstrap/scrollspy.js +1 -1
  13. data/vendor/assets/javascripts/twitter/bootstrap/tab.js +5 -7
  14. data/vendor/assets/javascripts/twitter/bootstrap/tooltip.js +12 -11
  15. data/vendor/assets/javascripts/twitter/bootstrap/transition.js +5 -5
  16. data/vendor/assets/javascripts/twitter/bootstrap/typeahead.js +19 -9
  17. data/vendor/frameworks/twitter/bootstrap/accordion.less +1 -1
  18. data/vendor/frameworks/twitter/bootstrap/alerts.less +1 -1
  19. data/vendor/frameworks/twitter/bootstrap/bootstrap.less +2 -1
  20. data/vendor/frameworks/twitter/bootstrap/breadcrumbs.less +1 -1
  21. data/vendor/frameworks/twitter/bootstrap/button-groups.less +5 -8
  22. data/vendor/frameworks/twitter/bootstrap/buttons.less +17 -16
  23. data/vendor/frameworks/twitter/bootstrap/close.less +1 -1
  24. data/vendor/frameworks/twitter/bootstrap/code.less +2 -2
  25. data/vendor/frameworks/twitter/bootstrap/dropdowns.less +32 -5
  26. data/vendor/frameworks/twitter/bootstrap/forms.less +47 -14
  27. data/vendor/frameworks/twitter/bootstrap/hero-unit.less +6 -5
  28. data/vendor/frameworks/twitter/bootstrap/labels-badges.less +4 -2
  29. data/vendor/frameworks/twitter/bootstrap/layouts.less +1 -1
  30. data/vendor/frameworks/twitter/bootstrap/media.less +55 -0
  31. data/vendor/frameworks/twitter/bootstrap/mixins.less +15 -10
  32. data/vendor/frameworks/twitter/bootstrap/modals.less +7 -11
  33. data/vendor/frameworks/twitter/bootstrap/navbar.less +6 -6
  34. data/vendor/frameworks/twitter/bootstrap/navs.less +3 -2
  35. data/vendor/frameworks/twitter/bootstrap/pager.less +11 -10
  36. data/vendor/frameworks/twitter/bootstrap/pagination.less +69 -12
  37. data/vendor/frameworks/twitter/bootstrap/popovers.less +2 -2
  38. data/vendor/frameworks/twitter/bootstrap/progress-bars.less +2 -2
  39. data/vendor/frameworks/twitter/bootstrap/reset.less +5 -4
  40. data/vendor/frameworks/twitter/bootstrap/responsive-767px-max.less +20 -1
  41. data/vendor/frameworks/twitter/bootstrap/responsive-navbar.less +12 -4
  42. data/vendor/frameworks/twitter/bootstrap/responsive.less +1 -1
  43. data/vendor/frameworks/twitter/bootstrap/sprites.less +3 -3
  44. data/vendor/frameworks/twitter/bootstrap/tables.less +20 -29
  45. data/vendor/frameworks/twitter/bootstrap/thumbnails.less +1 -1
  46. data/vendor/frameworks/twitter/bootstrap/tooltip.less +1 -1
  47. data/vendor/frameworks/twitter/bootstrap/type.less +30 -24
  48. data/vendor/frameworks/twitter/bootstrap/variables.less +23 -1
  49. data/vendor/frameworks/twitter/bootstrap/wells.less +3 -3
  50. metadata +33 -11
@@ -6,6 +6,10 @@
6
6
  .hero-unit {
7
7
  padding: 60px;
8
8
  margin-bottom: 30px;
9
+ font-size: 18px;
10
+ font-weight: 200;
11
+ line-height: @baseLineHeight * 1.5;
12
+ color: @heroUnitLeadColor;
9
13
  background-color: @heroUnitBackground;
10
14
  .border-radius(6px);
11
15
  h1 {
@@ -15,10 +19,7 @@
15
19
  color: @heroUnitHeadingColor;
16
20
  letter-spacing: -1px;
17
21
  }
18
- p {
19
- font-size: 18px;
20
- font-weight: 200;
21
- line-height: @baseLineHeight * 1.5;
22
- color: @heroUnitLeadColor;
22
+ li {
23
+ line-height: @baseLineHeight * 1.5; // Reset since we specify in type.less
23
24
  }
24
25
  }
@@ -6,6 +6,8 @@
6
6
  // Base classes
7
7
  .label,
8
8
  .badge {
9
+ display: inline-block;
10
+ padding: 2px 4px;
9
11
  font-size: @baseFontSize * .846;
10
12
  font-weight: bold;
11
13
  line-height: 14px; // ensure proper line-height if floated
@@ -17,11 +19,11 @@
17
19
  }
18
20
  // Set unique padding and border-radii
19
21
  .label {
20
- padding: 1px 4px 2px;
21
22
  .border-radius(3px);
22
23
  }
23
24
  .badge {
24
- padding: 1px 9px 2px;
25
+ padding-left: 9px;
26
+ padding-right: 9px;
25
27
  .border-radius(9px);
26
28
  }
27
29
 
@@ -13,4 +13,4 @@
13
13
  padding-right: @gridGutterWidth;
14
14
  padding-left: @gridGutterWidth;
15
15
  .clearfix();
16
- }
16
+ }
@@ -0,0 +1,55 @@
1
+ // Media objects
2
+ // Source: http://stubbornella.org/content/?p=497
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Common styles
7
+ // -------------------------
8
+
9
+ // Clear the floats
10
+ .media,
11
+ .media-body {
12
+ overflow: hidden;
13
+ *overflow: visible;
14
+ zoom: 1;
15
+ }
16
+
17
+ // Proper spacing between instances of .media
18
+ .media,
19
+ .media .media {
20
+ margin-top: 15px;
21
+ }
22
+ .media:first-child {
23
+ margin-top: 0;
24
+ }
25
+
26
+ // For images and videos, set to block
27
+ .media-object {
28
+ display: block;
29
+ }
30
+
31
+ // Reset margins on headings for tighter default spacing
32
+ .media-heading {
33
+ margin: 0 0 5px;
34
+ }
35
+
36
+
37
+ // Media image alignment
38
+ // -------------------------
39
+
40
+ .media .pull-left {
41
+ margin-right: 10px;
42
+ }
43
+ .media .pull-right {
44
+ margin-left: 10px;
45
+ }
46
+
47
+
48
+ // Media list variation
49
+ // -------------------------
50
+
51
+ // Undo default ul/ol styles
52
+ .media-list {
53
+ margin-left: 0;
54
+ list-style: none;
55
+ }
@@ -154,7 +154,7 @@
154
154
  .input-block-level {
155
155
  display: block;
156
156
  width: 100%;
157
- min-height: 30px; // Make inputs at least the height of their button counterpart
157
+ min-height: @inputHeight; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
158
158
  .box-sizing(border-box); // Makes inputs behave like true block-level elements
159
159
  }
160
160
 
@@ -183,7 +183,8 @@
183
183
  .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
184
184
  &:focus {
185
185
  border-color: darken(@borderColor, 10%);
186
- .box-shadow(inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@borderColor, 20%));
186
+ @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@borderColor, 20%);
187
+ .box-shadow(@shadow);
187
188
  }
188
189
  }
189
190
  // Give a small background color for input-prepend/-append
@@ -248,12 +249,10 @@
248
249
  }
249
250
 
250
251
  // Drop shadows
251
- .box-shadow(@shadowA, @shadowB:X, ...){
252
- // Multiple shadow solution from http://toekneestuck.com/blog/2012/05/15/less-css-arguments-variable/
253
- @props: ~`"@{arguments}".replace(/[\[\]]|\,\sX/g, '')`;
254
- -webkit-box-shadow: @props;
255
- -moz-box-shadow: @props;
256
- box-shadow: @props;
252
+ .box-shadow(@shadow) {
253
+ -webkit-box-shadow: @shadow;
254
+ -moz-box-shadow: @shadow;
255
+ box-shadow: @shadow;
257
256
  }
258
257
 
259
258
  // Transitions
@@ -298,6 +297,7 @@
298
297
  -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twitter/bootstrap/issues/4885
299
298
  -o-transform: skew(@x, @y);
300
299
  transform: skew(@x, @y);
300
+ -webkit-backface-visibility: hidden; // See https://github.com/twitter/bootstrap/issues/5319
301
301
  }
302
302
  .translate3d(@x, @y, @z) {
303
303
  -webkit-transform: translate3d(@x, @y, @z);
@@ -325,7 +325,7 @@
325
325
  }
326
326
 
327
327
  // Background sizing
328
- .background-size(@size){
328
+ .background-size(@size) {
329
329
  -webkit-background-size: @size;
330
330
  -moz-background-size: @size;
331
331
  -o-background-size: @size;
@@ -447,7 +447,7 @@
447
447
  background-repeat: no-repeat;
448
448
  filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down, gets no color-stop at all for proper fallback
449
449
  }
450
- .radial(@innerColor: #555, @outerColor: #333) {
450
+ .radial(@innerColor: #555, @outerColor: #333) {
451
451
  background-color: @outerColor;
452
452
  background-image: -webkit-gradient(radial, center center, 0, center center, 460, from(@innerColor), to(@outerColor));
453
453
  background-image: -webkit-radial-gradient(circle, @innerColor, @outerColor);
@@ -643,6 +643,11 @@
643
643
  margin-left: 0;
644
644
  }
645
645
 
646
+ // Space grid-sized controls properly if multiple per line
647
+ .controls-row [class*="span"] + [class*="span"] {
648
+ margin-left: @fluidGridGutterWidth;
649
+ }
650
+
646
651
  // generate .spanX and .offsetX
647
652
  .spanX (@gridColumns);
648
653
  .offsetX (@gridColumns);
@@ -2,16 +2,6 @@
2
2
  // Modals
3
3
  // --------------------------------------------------
4
4
 
5
-
6
- // Recalculate z-index where appropriate,
7
- // but only apply to elements within modal
8
- .modal-open .modal {
9
- .dropdown-menu { z-index: @zindexDropdown + @zindexModal; }
10
- .dropdown.open { *z-index: @zindexDropdown + @zindexModal; }
11
- .popover { z-index: @zindexPopover + @zindexModal; }
12
- .tooltip { z-index: @zindexTooltip + @zindexModal; }
13
- }
14
-
15
5
  // Background
16
6
  .modal-backdrop {
17
7
  position: fixed;
@@ -36,7 +26,6 @@
36
26
  top: 50%;
37
27
  left: 50%;
38
28
  z-index: @zindexModal;
39
- overflow: auto;
40
29
  width: 560px;
41
30
  margin: -250px 0 0 -280px;
42
31
  background-color: @white;
@@ -46,6 +35,9 @@
46
35
  .border-radius(6px);
47
36
  .box-shadow(0 3px 7px rgba(0,0,0,0.3));
48
37
  .background-clip(padding-box);
38
+ // Remove focus outline from opened modal
39
+ outline: none;
40
+
49
41
  &.fade {
50
42
  .transition(e('opacity .3s linear, top .3s ease-out'));
51
43
  top: -25%;
@@ -95,4 +87,8 @@
95
87
  .btn-group .btn + .btn {
96
88
  margin-left: -1px;
97
89
  }
90
+ // and override it for block buttons as well
91
+ .btn-block + .btn-block {
92
+ margin-left: 0;
93
+ }
98
94
  }
@@ -25,7 +25,7 @@
25
25
  padding-right: 20px;
26
26
  #gradient > .vertical(@navbarBackgroundHighlight, @navbarBackground);
27
27
  border: 1px solid @navbarBorder;
28
- .border-radius(4px);
28
+ .border-radius(@baseBorderRadius);
29
29
  .box-shadow(0 1px 4px rgba(0,0,0,.065));
30
30
 
31
31
  // Prevent floats from breaking the navbar
@@ -41,6 +41,7 @@
41
41
  // Override the default collapsed state
42
42
  .nav-collapse.collapse {
43
43
  height: auto;
44
+ overflow: visible;
44
45
  }
45
46
 
46
47
 
@@ -152,7 +153,6 @@
152
153
 
153
154
  .navbar-static-top {
154
155
  position: static;
155
- width: 100%;
156
156
  margin-bottom: 0; // remove 18px margin for default navbar
157
157
  .navbar-inner {
158
158
  .border-radius(0);
@@ -202,7 +202,7 @@
202
202
  .navbar-fixed-top,
203
203
  .navbar-static-top {
204
204
  .navbar-inner {
205
- .box-shadow(inset 0 -1px 0 rgba(0,0,0,.1), 0 1px 10px rgba(0,0,0,.1));
205
+ .box-shadow(~"0 1px 10px rgba(0,0,0,.1)");
206
206
  }
207
207
  }
208
208
 
@@ -210,7 +210,7 @@
210
210
  .navbar-fixed-bottom {
211
211
  bottom: 0;
212
212
  .navbar-inner {
213
- .box-shadow(inset 0 1px 0 rgba(0,0,0,.1), 0 -1px 10px rgba(0,0,0,.1));
213
+ .box-shadow(~"0 -1px 10px rgba(0,0,0,.1)");
214
214
  }
215
215
  }
216
216
 
@@ -274,7 +274,7 @@
274
274
  margin-left: 5px;
275
275
  margin-right: 5px;
276
276
  .buttonBackground(darken(@navbarBackgroundHighlight, 5%), darken(@navbarBackground, 5%));
277
- .box-shadow(inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075));
277
+ .box-shadow(~"inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075)");
278
278
  }
279
279
  .navbar .btn-navbar .icon-bar {
280
280
  display: block;
@@ -446,7 +446,7 @@
446
446
  color: @white;
447
447
  background-color: @navbarInverseSearchBackground;
448
448
  border-color: @navbarInverseSearchBorder;
449
- .box-shadow(inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15));
449
+ .box-shadow(~"inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15)");
450
450
  .transition(none);
451
451
  .placeholder(@navbarInverseSearchPlaceholderColor);
452
452
 
@@ -67,7 +67,8 @@
67
67
  text-shadow: 0 -1px 0 rgba(0,0,0,.2);
68
68
  background-color: @linkColor;
69
69
  }
70
- .nav-list [class^="icon-"] {
70
+ .nav-list [class^="icon-"],
71
+ .nav-list [class*=" icon-"] {
71
72
  margin-right: 2px;
72
73
  }
73
74
  // Dividers (basically an hr) within the dropdown
@@ -123,7 +124,7 @@
123
124
  .nav-tabs > .active > a,
124
125
  .nav-tabs > .active > a:hover {
125
126
  color: @gray;
126
- background-color: @white;
127
+ background-color: @bodyBackground;
127
128
  border: 1px solid #ddd;
128
129
  border-bottom-color: transparent;
129
130
  cursor: default;
@@ -12,29 +12,30 @@
12
12
  .pager li {
13
13
  display: inline;
14
14
  }
15
- .pager a,
16
- .pager span {
15
+ .pager li > a,
16
+ .pager li > span {
17
17
  display: inline-block;
18
18
  padding: 5px 14px;
19
19
  background-color: #fff;
20
20
  border: 1px solid #ddd;
21
21
  .border-radius(15px);
22
22
  }
23
- .pager a:hover {
23
+ .pager li > a:hover {
24
24
  text-decoration: none;
25
25
  background-color: #f5f5f5;
26
26
  }
27
- .pager .next a,
28
- .pager .next span {
27
+ .pager .next > a,
28
+ .pager .next > span {
29
29
  float: right;
30
30
  }
31
- .pager .previous a {
31
+ .pager .previous > a,
32
+ .pager .previous > span {
32
33
  float: left;
33
34
  }
34
- .pager .disabled a,
35
- .pager .disabled a:hover,
36
- .pager .disabled span {
35
+ .pager .disabled > a,
36
+ .pager .disabled > a:hover,
37
+ .pager .disabled > span {
37
38
  color: @grayLight;
38
39
  background-color: #fff;
39
40
  cursor: default;
40
- }
41
+ }
@@ -2,27 +2,30 @@
2
2
  // Pagination (multiple pages)
3
3
  // --------------------------------------------------
4
4
 
5
-
5
+ // Space out pagination from surrounding content
6
6
  .pagination {
7
- height: @baseLineHeight * 2;
8
7
  margin: @baseLineHeight 0;
9
- }
8
+ }
9
+
10
10
  .pagination ul {
11
+ // Allow for text-based alignment
11
12
  display: inline-block;
12
13
  .ie7-inline-block();
14
+ // Reset default ul styles
13
15
  margin-left: 0;
14
16
  margin-bottom: 0;
15
- .border-radius(3px);
17
+ // Visuals
18
+ .border-radius(@baseBorderRadius);
16
19
  .box-shadow(0 1px 2px rgba(0,0,0,.05));
17
20
  }
18
21
  .pagination ul > li {
19
- display: inline;
22
+ display: inline; // Remove list-style and block-level defaults
20
23
  }
21
24
  .pagination ul > li > a,
22
25
  .pagination ul > li > span {
23
- float: left;
24
- padding: 0 14px;
25
- line-height: (@baseLineHeight * 2) - 2;
26
+ float: left; // Collapse white-space
27
+ padding: 4px 12px;
28
+ line-height: @baseLineHeight;
26
29
  text-decoration: none;
27
30
  background-color: @paginationBackground;
28
31
  border: 1px solid @paginationBorder;
@@ -31,7 +34,7 @@
31
34
  .pagination ul > li > a:hover,
32
35
  .pagination ul > .active > a,
33
36
  .pagination ul > .active > span {
34
- background-color: #f5f5f5;
37
+ background-color: @paginationActiveBackground;
35
38
  }
36
39
  .pagination ul > .active > a,
37
40
  .pagination ul > .active > span {
@@ -48,17 +51,71 @@
48
51
  .pagination ul > li:first-child > a,
49
52
  .pagination ul > li:first-child > span {
50
53
  border-left-width: 1px;
51
- .border-radius(3px 0 0 3px);
54
+ .border-left-radius(@baseBorderRadius);
52
55
  }
53
56
  .pagination ul > li:last-child > a,
54
57
  .pagination ul > li:last-child > span {
55
- .border-radius(0 3px 3px 0);
58
+ .border-right-radius(@baseBorderRadius);
56
59
  }
57
60
 
58
- // Centered
61
+
62
+ // Alignment
63
+ // --------------------------------------------------
64
+
59
65
  .pagination-centered {
60
66
  text-align: center;
61
67
  }
62
68
  .pagination-right {
63
69
  text-align: right;
64
70
  }
71
+
72
+
73
+ // Sizing
74
+ // --------------------------------------------------
75
+
76
+ // Large
77
+ .pagination-large {
78
+ ul > li > a,
79
+ ul > li > span {
80
+ padding: @paddingLarge;
81
+ font-size: @fontSizeLarge;
82
+ }
83
+ ul > li:first-child > a,
84
+ ul > li:first-child > span {
85
+ .border-left-radius(@borderRadiusLarge);
86
+ }
87
+ ul > li:last-child > a,
88
+ ul > li:last-child > span {
89
+ .border-right-radius(@borderRadiusLarge);
90
+ }
91
+ }
92
+
93
+ // Small and mini
94
+ .pagination-mini,
95
+ .pagination-small {
96
+ ul > li:first-child > a,
97
+ ul > li:first-child > span {
98
+ .border-left-radius(@borderRadiusSmall);
99
+ }
100
+ ul > li:last-child > a,
101
+ ul > li:last-child > span {
102
+ .border-right-radius(@borderRadiusSmall);
103
+ }
104
+ }
105
+
106
+ // Small
107
+ .pagination-small {
108
+ ul > li > a,
109
+ ul > li > span {
110
+ padding: @paddingSmall;
111
+ font-size: @fontSizeSmall;
112
+ }
113
+ }
114
+ // Mini
115
+ .pagination-mini {
116
+ ul > li > a,
117
+ ul > li > span {
118
+ padding: @paddingMini;
119
+ font-size: @fontSizeMini;
120
+ }
121
+ }