less-rails-bootstrap 2.0.13 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. data/.gitignore +2 -1
  2. data/CHANGELOG.md +2 -2
  3. data/lib/less/rails/bootstrap/version.rb +1 -1
  4. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  5. data/vendor/assets/javascripts/twitter/bootstrap.js +1 -0
  6. data/vendor/assets/javascripts/twitter/bootstrap/affix.js +104 -0
  7. data/vendor/assets/javascripts/twitter/bootstrap/alert.js +1 -1
  8. data/vendor/assets/javascripts/twitter/bootstrap/button.js +1 -1
  9. data/vendor/assets/javascripts/twitter/bootstrap/carousel.js +12 -5
  10. data/vendor/assets/javascripts/twitter/bootstrap/collapse.js +4 -3
  11. data/vendor/assets/javascripts/twitter/bootstrap/dropdown.js +66 -16
  12. data/vendor/assets/javascripts/twitter/bootstrap/modal.js +95 -74
  13. data/vendor/assets/javascripts/twitter/bootstrap/popover.js +9 -4
  14. data/vendor/assets/javascripts/twitter/bootstrap/scrollspy.js +9 -9
  15. data/vendor/assets/javascripts/twitter/bootstrap/tab.js +2 -2
  16. data/vendor/assets/javascripts/twitter/bootstrap/tooltip.js +15 -15
  17. data/vendor/assets/javascripts/twitter/bootstrap/transition.js +2 -3
  18. data/vendor/assets/javascripts/twitter/bootstrap/typeahead.js +50 -35
  19. data/vendor/frameworks/twitter/bootstrap/accordion.less +3 -2
  20. data/vendor/frameworks/twitter/bootstrap/alerts.less +16 -9
  21. data/vendor/frameworks/twitter/bootstrap/bootstrap.less +1 -1
  22. data/vendor/frameworks/twitter/bootstrap/breadcrumbs.less +10 -10
  23. data/vendor/frameworks/twitter/bootstrap/button-groups.less +76 -23
  24. data/vendor/frameworks/twitter/bootstrap/buttons.less +85 -65
  25. data/vendor/frameworks/twitter/bootstrap/carousel.less +13 -3
  26. data/vendor/frameworks/twitter/bootstrap/close.less +4 -2
  27. data/vendor/frameworks/twitter/bootstrap/code.less +6 -5
  28. data/vendor/frameworks/twitter/bootstrap/component-animations.less +5 -2
  29. data/vendor/frameworks/twitter/bootstrap/dropdowns.less +81 -14
  30. data/vendor/frameworks/twitter/bootstrap/forms.less +100 -48
  31. data/vendor/frameworks/twitter/bootstrap/grid.less +17 -1
  32. data/vendor/frameworks/twitter/bootstrap/hero-unit.less +4 -2
  33. data/vendor/frameworks/twitter/bootstrap/labels-badges.less +19 -2
  34. data/vendor/frameworks/twitter/bootstrap/layouts.less +1 -2
  35. data/vendor/frameworks/twitter/bootstrap/mixins.less +98 -73
  36. data/vendor/frameworks/twitter/bootstrap/modals.less +9 -2
  37. data/vendor/frameworks/twitter/bootstrap/navbar.less +238 -127
  38. data/vendor/frameworks/twitter/bootstrap/navs.less +38 -17
  39. data/vendor/frameworks/twitter/bootstrap/pager.less +5 -4
  40. data/vendor/frameworks/twitter/bootstrap/pagination.less +16 -8
  41. data/vendor/frameworks/twitter/bootstrap/popovers.less +101 -33
  42. data/vendor/frameworks/twitter/bootstrap/progress-bars.less +18 -13
  43. data/vendor/frameworks/twitter/bootstrap/reset.less +6 -3
  44. data/vendor/frameworks/twitter/bootstrap/responsive-1200px-min.less +9 -7
  45. data/vendor/frameworks/twitter/bootstrap/responsive-767px-max.less +86 -68
  46. data/vendor/frameworks/twitter/bootstrap/responsive-768px-979px.less +7 -5
  47. data/vendor/frameworks/twitter/bootstrap/responsive-navbar.less +18 -5
  48. data/vendor/frameworks/twitter/bootstrap/responsive-utilities.less +17 -15
  49. data/vendor/frameworks/twitter/bootstrap/responsive.less +5 -5
  50. data/vendor/frameworks/twitter/bootstrap/scaffolding.less +26 -4
  51. data/vendor/frameworks/twitter/bootstrap/sprites.less +15 -19
  52. data/vendor/frameworks/twitter/bootstrap/tables.less +60 -11
  53. data/vendor/frameworks/twitter/bootstrap/thumbnails.less +9 -4
  54. data/vendor/frameworks/twitter/bootstrap/tooltip.less +47 -12
  55. data/vendor/frameworks/twitter/bootstrap/type.less +57 -83
  56. data/vendor/frameworks/twitter/bootstrap/utilities.less +9 -2
  57. data/vendor/frameworks/twitter/bootstrap/variables.less +100 -29
  58. data/vendor/frameworks/twitter/bootstrap/wells.less +7 -5
  59. metadata +11 -12
  60. data/vendor/frameworks/twitter/bootstrap/badges.less +0 -36
  61. data/vendor/frameworks/twitter/bootstrap/labels.less +0 -38
@@ -1,11 +1,13 @@
1
- // BUTTON GROUPS
2
- // -------------
1
+ //
2
+ // Button groups
3
+ // --------------------------------------------------
3
4
 
4
5
 
5
6
  // Make the div behave like a button
6
7
  .btn-group {
7
8
  position: relative;
8
- .clearfix(); // clears the floated buttons
9
+ font-size: 0; // remove as part 1 of font-size inline-block hack
10
+ white-space: nowrap; // prevent buttons from wrapping when in tight spaces (e.g., the table on the tests page)
9
11
  .ie7-restore-left-whitespace();
10
12
  }
11
13
 
@@ -16,21 +18,44 @@
16
18
 
17
19
  // Optional: Group multiple button groups together for a toolbar
18
20
  .btn-toolbar {
21
+ font-size: 0; // Hack to remove whitespace that results from using inline-block
19
22
  margin-top: @baseLineHeight / 2;
20
23
  margin-bottom: @baseLineHeight / 2;
21
24
  .btn-group {
22
25
  display: inline-block;
23
26
  .ie7-inline-block();
24
27
  }
28
+ .btn + .btn,
29
+ .btn-group + .btn,
30
+ .btn + .btn-group {
31
+ margin-left: 5px;
32
+ }
25
33
  }
26
34
 
27
35
  // Float them, remove border radius, then re-add to first and last elements
28
36
  .btn-group > .btn {
29
37
  position: relative;
30
- float: left;
31
- margin-left: -1px;
32
38
  .border-radius(0);
33
39
  }
40
+ .btn-group > .btn + .btn {
41
+ margin-left: -1px;
42
+ }
43
+ .btn-group > .btn,
44
+ .btn-group > .dropdown-menu {
45
+ font-size: @baseFontSize; // redeclare as part 2 of font-size inline-block hack
46
+ }
47
+
48
+ // Reset fonts for other sizes
49
+ .btn-group > .btn-mini {
50
+ font-size: 11px;
51
+ }
52
+ .btn-group > .btn-small {
53
+ font-size: 12px;
54
+ }
55
+ .btn-group > .btn-large {
56
+ font-size: 16px;
57
+ }
58
+
34
59
  // Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
35
60
  .btn-group > .btn:first-child {
36
61
  margin-left: 0;
@@ -91,24 +116,28 @@
91
116
  // ----------------------
92
117
 
93
118
  // Give the line between buttons some depth
94
- .btn-group > .dropdown-toggle {
119
+ .btn-group > .btn + .dropdown-toggle {
95
120
  padding-left: 8px;
96
121
  padding-right: 8px;
97
122
  .box-shadow(~"inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)");
98
- *padding-top: 4px;
99
- *padding-bottom: 4px;
123
+ *padding-top: 5px;
124
+ *padding-bottom: 5px;
100
125
  }
101
- .btn-group > .btn-mini.dropdown-toggle {
126
+ .btn-group > .btn-mini + .dropdown-toggle {
102
127
  padding-left: 5px;
103
128
  padding-right: 5px;
129
+ *padding-top: 2px;
130
+ *padding-bottom: 2px;
104
131
  }
105
- .btn-group > .btn-small.dropdown-toggle {
106
- *padding-top: 4px;
132
+ .btn-group > .btn-small + .dropdown-toggle {
133
+ *padding-top: 5px;
107
134
  *padding-bottom: 4px;
108
135
  }
109
- .btn-group > .btn-large.dropdown-toggle {
136
+ .btn-group > .btn-large + .dropdown-toggle {
110
137
  padding-left: 12px;
111
138
  padding-right: 12px;
139
+ *padding-top: 7px;
140
+ *padding-bottom: 7px;
112
141
  }
113
142
 
114
143
  .btn-group.open {
@@ -147,22 +176,16 @@
147
176
 
148
177
  // Reposition the caret
149
178
  .btn .caret {
150
- margin-top: 7px;
179
+ margin-top: 8px;
151
180
  margin-left: 0;
152
181
  }
153
- .btn:hover .caret,
154
- .open.btn-group .caret {
155
- .opacity(100);
156
- }
157
182
  // Carets in other button sizes
158
- .btn-mini .caret {
159
- margin-top: 5px;
160
- }
161
- .btn-small .caret {
183
+ .btn-mini .caret,
184
+ .btn-small .caret,
185
+ .btn-large .caret {
162
186
  margin-top: 6px;
163
187
  }
164
188
  .btn-large .caret {
165
- margin-top: 6px;
166
189
  border-left-width: 5px;
167
190
  border-right-width: 5px;
168
191
  border-top-width: 5px;
@@ -185,7 +208,37 @@
185
208
  .caret {
186
209
  border-top-color: @white;
187
210
  border-bottom-color: @white;
188
- .opacity(75);
189
211
  }
190
212
  }
191
213
 
214
+
215
+
216
+ // Vertical button groups
217
+ // ----------------------
218
+
219
+ .btn-group-vertical {
220
+ display: inline-block; // makes buttons only take up the width they need
221
+ .ie7-inline-block();
222
+ }
223
+ .btn-group-vertical .btn {
224
+ display: block;
225
+ float: none;
226
+ width: 100%;
227
+ .border-radius(0);
228
+ }
229
+ .btn-group-vertical .btn + .btn {
230
+ margin-left: 0;
231
+ margin-top: -1px;
232
+ }
233
+ .btn-group-vertical .btn:first-child {
234
+ .border-radius(4px 4px 0 0);
235
+ }
236
+ .btn-group-vertical .btn:last-child {
237
+ .border-radius(0 0 4px 4px);
238
+ }
239
+ .btn-group-vertical .btn-large:first-child {
240
+ .border-radius(6px 6px 0 0);
241
+ }
242
+ .btn-group-vertical .btn-large:last-child {
243
+ .border-radius(0 0 6px 6px);
244
+ }
@@ -1,5 +1,6 @@
1
- // BUTTON STYLES
2
- // -------------
1
+ //
2
+ // Buttons
3
+ // --------------------------------------------------
3
4
 
4
5
 
5
6
  // Base styles
@@ -9,64 +10,64 @@
9
10
  .btn {
10
11
  display: inline-block;
11
12
  .ie7-inline-block();
12
- padding: 4px 10px 4px;
13
+ padding: 4px 14px;
13
14
  margin-bottom: 0; // For input.btn
14
15
  font-size: @baseFontSize;
15
16
  line-height: @baseLineHeight;
16
- *line-height: 20px;
17
- color: @grayDark;
17
+ *line-height: @baseLineHeight;
18
18
  text-align: center;
19
- text-shadow: 0 1px 1px rgba(255,255,255,.75);
20
19
  vertical-align: middle;
21
20
  cursor: pointer;
22
- .buttonBackground(@btnBackground, @btnBackgroundHighlight);
21
+ .buttonBackground(@btnBackground, @btnBackgroundHighlight, @grayDark, 0 1px 1px rgba(255,255,255,.75));
23
22
  border: 1px solid @btnBorder;
24
23
  *border: 0; // Remove the border to prevent IE7's black border on input:focus
25
24
  border-bottom-color: darken(@btnBorder, 10%);
26
25
  .border-radius(4px);
27
26
  .ie7-restore-left-whitespace(); // Give IE7 some love
28
27
  .box-shadow(~"inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)");
29
- }
30
28
 
31
- // Hover state
32
- .btn:hover {
33
- color: @grayDark;
34
- text-decoration: none;
35
- background-color: darken(@white, 10%);
36
- *background-color: darken(@white, 15%); /* Buttons in IE7 don't get borders, so darken on hover */
37
- background-position: 0 -15px;
29
+ // Hover state
30
+ &:hover {
31
+ color: @grayDark;
32
+ text-decoration: none;
33
+ background-color: darken(@white, 10%);
34
+ *background-color: darken(@white, 15%); /* Buttons in IE7 don't get borders, so darken on hover */
35
+ background-position: 0 -15px;
36
+
37
+ // transition is only when going to hover, otherwise the background
38
+ // behind the gradient (there for IE<=9 fallback) gets mismatched
39
+ .transition(background-position .1s linear);
40
+ }
38
41
 
39
- // transition is only when going to hover, otherwise the background
40
- // behind the gradient (there for IE<=9 fallback) gets mismatched
41
- .transition(background-position .1s linear);
42
- }
42
+ // Focus state for keyboard and accessibility
43
+ &:focus {
44
+ .tab-focus();
45
+ }
43
46
 
44
- // Focus state for keyboard and accessibility
45
- .btn:focus {
46
- .tab-focus();
47
- }
47
+ // Active state
48
+ &.active,
49
+ &:active {
50
+ background-color: darken(@white, 10%);
51
+ background-color: darken(@white, 15%) e("\9");
52
+ background-image: none;
53
+ outline: 0;
54
+ .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)");
55
+ }
48
56
 
49
- // Active state
50
- .btn.active,
51
- .btn:active {
52
- background-color: darken(@white, 10%);
53
- background-color: darken(@white, 15%) e("\9");
54
- background-image: none;
55
- outline: 0;
56
- .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)");
57
- }
57
+ // Disabled state
58
+ &.disabled,
59
+ &[disabled] {
60
+ cursor: default;
61
+ background-color: darken(@white, 10%);
62
+ background-image: none;
63
+ .opacity(65);
64
+ .box-shadow(none);
65
+ }
58
66
 
59
- // Disabled state
60
- .btn.disabled,
61
- .btn[disabled] {
62
- cursor: default;
63
- background-color: darken(@white, 10%);
64
- background-image: none;
65
- .opacity(65);
66
- .box-shadow(none);
67
67
  }
68
68
 
69
69
 
70
+
70
71
  // Button Sizes
71
72
  // --------------------------------------------------
72
73
 
@@ -78,47 +79,42 @@
78
79
  .border-radius(5px);
79
80
  }
80
81
  .btn-large [class^="icon-"] {
81
- margin-top: 1px;
82
+ margin-top: 2px;
82
83
  }
83
84
 
84
85
  // Small
85
86
  .btn-small {
86
- padding: 5px 9px;
87
+ padding: 3px 9px;
87
88
  font-size: @baseFontSize - 2px;
88
89
  line-height: @baseLineHeight - 2px;
89
90
  }
90
91
  .btn-small [class^="icon-"] {
91
- margin-top: -1px;
92
+ margin-top: 0;
92
93
  }
93
94
 
94
95
  // Mini
95
96
  .btn-mini {
96
97
  padding: 2px 6px;
97
- font-size: @baseFontSize - 2px;
98
+ font-size: @baseFontSize - 3px;
98
99
  line-height: @baseLineHeight - 4px;
99
100
  }
100
101
 
102
+ // Block button
103
+ .btn-block {
104
+ display: block;
105
+ width: 100%;
106
+ padding-left: 0;
107
+ padding-right: 0;
108
+ .box-sizing(border-box);
109
+ }
110
+ .btn-block + .btn-block {
111
+ margin-top: 5px;
112
+ }
113
+
101
114
 
102
115
  // Alternate buttons
103
116
  // --------------------------------------------------
104
117
 
105
- // Set text color
106
- // -------------------------
107
- .btn-primary,
108
- .btn-primary:hover,
109
- .btn-warning,
110
- .btn-warning:hover,
111
- .btn-danger,
112
- .btn-danger:hover,
113
- .btn-success,
114
- .btn-success:hover,
115
- .btn-info,
116
- .btn-info:hover,
117
- .btn-inverse,
118
- .btn-inverse:hover {
119
- color: @white;
120
- text-shadow: 0 -1px 0 rgba(0,0,0,.25);
121
- }
122
118
  // Provide *some* extra contrast for those who can get it
123
119
  .btn-primary.active,
124
120
  .btn-warning.active,
@@ -133,8 +129,8 @@
133
129
  // -------------------------
134
130
  .btn {
135
131
  // reset here as of 2.0.3 due to Recess property order
136
- border-color: #ccc;
137
- border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);
132
+ border-color: #c5c5c5;
133
+ border-color: rgba(0,0,0,.15) rgba(0,0,0,.15) rgba(0,0,0,.25);
138
134
  }
139
135
  .btn-primary {
140
136
  .buttonBackground(@btnPrimaryBackground, @btnPrimaryBackgroundHighlight);
@@ -174,8 +170,9 @@ input[type="submit"].btn {
174
170
  }
175
171
 
176
172
  // IE7 has some default padding on button controls
177
- *padding-top: 2px;
178
- *padding-bottom: 2px;
173
+ *padding-top: 3px;
174
+ *padding-bottom: 3px;
175
+
179
176
  &.btn-large {
180
177
  *padding-top: 7px;
181
178
  *padding-bottom: 7px;
@@ -189,3 +186,26 @@ input[type="submit"].btn {
189
186
  *padding-bottom: 1px;
190
187
  }
191
188
  }
189
+
190
+
191
+ // Link buttons
192
+ // --------------------------------------------------
193
+
194
+ // Make a button look and behave like a link
195
+ .btn-link,
196
+ .btn-link:active {
197
+ background-color: transparent;
198
+ background-image: none;
199
+ .box-shadow(none);
200
+ }
201
+ .btn-link {
202
+ border-color: transparent;
203
+ cursor: pointer;
204
+ color: @linkColor;
205
+ .border-radius(0);
206
+ }
207
+ .btn-link:hover {
208
+ color: @linkColorHover;
209
+ text-decoration: underline;
210
+ background-color: transparent;
211
+ }
@@ -1,5 +1,7 @@
1
- // CAROUSEL
2
- // --------
1
+ //
2
+ // Carousel
3
+ // --------------------------------------------------
4
+
3
5
 
4
6
  .carousel {
5
7
  position: relative;
@@ -103,6 +105,7 @@
103
105
  }
104
106
  }
105
107
 
108
+
106
109
  // Caption for text below images
107
110
  // -----------------------------
108
111
 
@@ -111,11 +114,18 @@
111
114
  left: 0;
112
115
  right: 0;
113
116
  bottom: 0;
114
- padding: 10px 15px 5px;
117
+ padding: 15px;
115
118
  background: @grayDark;
116
119
  background: rgba(0,0,0,.75);
117
120
  }
118
121
  .carousel-caption h4,
119
122
  .carousel-caption p {
120
123
  color: @white;
124
+ line-height: @baseLineHeight;
125
+ }
126
+ .carousel-caption h4 {
127
+ margin: 0 0 5px;
128
+ }
129
+ .carousel-caption p {
130
+ margin-bottom: 0;
121
131
  }
@@ -1,5 +1,7 @@
1
- // CLOSE ICONS
2
- // -----------
1
+ //
2
+ // Close icons
3
+ // --------------------------------------------------
4
+
3
5
 
4
6
  .close {
5
7
  float: right;
@@ -1,13 +1,14 @@
1
- // Code.less
2
- // Code typography styles for the <code> and <pre> elements
3
- // --------------------------------------------------------
1
+ //
2
+ // Code (inline and blocK)
3
+ // --------------------------------------------------
4
+
4
5
 
5
6
  // Inline and block code styles
6
7
  code,
7
8
  pre {
8
9
  padding: 0 3px 2px;
9
10
  #font > #family > .monospace;
10
- font-size: @baseFontSize - 1;
11
+ font-size: @baseFontSize - 2;
11
12
  color: @grayDark;
12
13
  .border-radius(3px);
13
14
  }
@@ -25,7 +26,7 @@ pre {
25
26
  display: block;
26
27
  padding: (@baseLineHeight - 1) / 2;
27
28
  margin: 0 0 @baseLineHeight / 2;
28
- font-size: @baseFontSize * .925; // 13px to 12px
29
+ font-size: @baseFontSize - 1; // 14px to 13px
29
30
  line-height: @baseLineHeight;
30
31
  word-break: break-all;
31
32
  word-wrap: break-word;