less-rails-bootstrap 2.0.5 → 2.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. data/CHANGELOG.md +5 -0
  2. data/lib/less/rails/bootstrap/version.rb +1 -1
  3. data/test/cases/usage_css_spec.rb +19 -19
  4. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  5. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  6. data/vendor/assets/javascripts/twitter/bootstrap/alert.js +8 -5
  7. data/vendor/assets/javascripts/twitter/bootstrap/button.js +3 -3
  8. data/vendor/assets/javascripts/twitter/bootstrap/carousel.js +5 -2
  9. data/vendor/assets/javascripts/twitter/bootstrap/collapse.js +2 -2
  10. data/vendor/assets/javascripts/twitter/bootstrap/dropdown.js +2 -2
  11. data/vendor/assets/javascripts/twitter/bootstrap/modal.js +6 -5
  12. data/vendor/assets/javascripts/twitter/bootstrap/popover.js +2 -2
  13. data/vendor/assets/javascripts/twitter/bootstrap/scrollspy.js +2 -2
  14. data/vendor/assets/javascripts/twitter/bootstrap/tab.js +2 -2
  15. data/vendor/assets/javascripts/twitter/bootstrap/tooltip.js +2 -2
  16. data/vendor/assets/javascripts/twitter/bootstrap/transition.js +3 -3
  17. data/vendor/assets/javascripts/twitter/bootstrap/typeahead.js +2 -2
  18. data/vendor/frameworks/twitter/bootstrap/accordion.less +0 -0
  19. data/vendor/frameworks/twitter/bootstrap/alerts.less +0 -0
  20. data/vendor/frameworks/twitter/bootstrap/bootstrap.less +1 -1
  21. data/vendor/frameworks/twitter/bootstrap/breadcrumbs.less +1 -1
  22. data/vendor/frameworks/twitter/bootstrap/button-groups.less +3 -2
  23. data/vendor/frameworks/twitter/bootstrap/buttons.less +26 -8
  24. data/vendor/frameworks/twitter/bootstrap/carousel.less +0 -0
  25. data/vendor/frameworks/twitter/bootstrap/close.less +0 -0
  26. data/vendor/frameworks/twitter/bootstrap/code.less +13 -0
  27. data/vendor/frameworks/twitter/bootstrap/component-animations.less +0 -0
  28. data/vendor/frameworks/twitter/bootstrap/dropdowns.less +1 -2
  29. data/vendor/frameworks/twitter/bootstrap/forms.less +49 -42
  30. data/vendor/frameworks/twitter/bootstrap/grid.less +0 -0
  31. data/vendor/frameworks/twitter/bootstrap/hero-unit.less +0 -0
  32. data/vendor/frameworks/twitter/bootstrap/labels.less +23 -7
  33. data/vendor/frameworks/twitter/bootstrap/layouts.less +0 -0
  34. data/vendor/frameworks/twitter/bootstrap/mixins.less +78 -25
  35. data/vendor/frameworks/twitter/bootstrap/modals.less +11 -0
  36. data/vendor/frameworks/twitter/bootstrap/navbar.less +12 -5
  37. data/vendor/frameworks/twitter/bootstrap/navs.less +22 -13
  38. data/vendor/frameworks/twitter/bootstrap/pager.less +0 -0
  39. data/vendor/frameworks/twitter/bootstrap/pagination.less +0 -0
  40. data/vendor/frameworks/twitter/bootstrap/popovers.less +0 -0
  41. data/vendor/frameworks/twitter/bootstrap/progress-bars.less +0 -0
  42. data/vendor/frameworks/twitter/bootstrap/reset.less +1 -1
  43. data/vendor/frameworks/twitter/bootstrap/responsive.less +10 -6
  44. data/vendor/frameworks/twitter/bootstrap/scaffolding.less +0 -0
  45. data/vendor/frameworks/twitter/bootstrap/sprites.less +7 -5
  46. data/vendor/frameworks/twitter/bootstrap/tables.less +14 -3
  47. data/vendor/frameworks/twitter/bootstrap/thumbnails.less +2 -2
  48. data/vendor/frameworks/twitter/bootstrap/tooltip.less +0 -0
  49. data/vendor/frameworks/twitter/bootstrap/type.less +3 -2
  50. data/vendor/frameworks/twitter/bootstrap/utilities.less +0 -0
  51. data/vendor/frameworks/twitter/bootstrap/variables.less +15 -7
  52. data/vendor/frameworks/twitter/bootstrap/wells.less +0 -0
  53. metadata +5 -5
File without changes
File without changes
@@ -11,12 +11,16 @@ pre {
11
11
  color: @grayDark;
12
12
  .border-radius(3px);
13
13
  }
14
+
15
+ // Inline code
14
16
  code {
15
17
  padding: 3px 4px;
16
18
  color: #d14;
17
19
  background-color: #f7f7f9;
18
20
  border: 1px solid #e1e1e8;
19
21
  }
22
+
23
+ // Blocks of code
20
24
  pre {
21
25
  display: block;
22
26
  padding: (@baseLineHeight - 1) / 2;
@@ -30,6 +34,7 @@ pre {
30
34
  white-space: pre;
31
35
  white-space: pre-wrap;
32
36
  word-break: break-all;
37
+ word-wrap: break-word;
33
38
 
34
39
  // Make prettyprint styles more spaced out for readability
35
40
  &.prettyprint {
@@ -39,6 +44,14 @@ pre {
39
44
  // Account for some code outputs that place code tags in pre tags
40
45
  code {
41
46
  padding: 0;
47
+ color: inherit;
42
48
  background-color: transparent;
49
+ border: 0;
43
50
  }
44
51
  }
52
+
53
+ // Enable scrollable blocks of code
54
+ .pre-scrollable {
55
+ max-height: 340px;
56
+ overflow-y: scroll;
57
+ }
@@ -46,7 +46,6 @@
46
46
  float: left;
47
47
  display: none; // none by default, but block on "open" of the menu
48
48
  min-width: 160px;
49
- max-width: 220px;
50
49
  _width: 160px;
51
50
  padding: 4px 0;
52
51
  margin: 0; // override default ul
@@ -93,7 +92,7 @@
93
92
  padding: 3px 15px;
94
93
  clear: both;
95
94
  font-weight: normal;
96
- line-height: 18px;
95
+ line-height: @baseLineHeight;
97
96
  color: @gray;
98
97
  white-space: nowrap;
99
98
  }
@@ -28,6 +28,12 @@ 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
@@ -36,7 +42,13 @@ input,
36
42
  button,
37
43
  select,
38
44
  textarea {
39
- #font > .sans-serif(@baseFontSize,normal,@baseLineHeight);
45
+ #font > .shorthand(@baseFontSize,normal,@baseLineHeight); // Set size, weight, line-height here
46
+ }
47
+ input,
48
+ button,
49
+ select,
50
+ textarea {
51
+ #font > #family > .sans-serif(); // And only set font-family here for those that need it (note the missing label element)
40
52
  }
41
53
 
42
54
  // Identify controls by their labels
@@ -84,13 +96,17 @@ input[type="radio"] {
84
96
  margin: 3px 0;
85
97
  *margin-top: 0; /* IE7 */
86
98
  line-height: normal;
87
- border: 0;
88
99
  cursor: pointer;
89
- .border-radius(0px); /* mirror bootstrap commit 9b9e1d3 reversing IE9 hack and use mixin instead */
100
+ .border-radius(0);
101
+ border: 0 \9; /* IE9 and down */
102
+ }
103
+ input[type="image"] {
104
+ border: 0;
90
105
  }
91
106
 
92
107
  // Reset the file input to browser defaults
93
108
  input[type="file"] {
109
+ width: auto;
94
110
  padding: initial;
95
111
  line-height: initial;
96
112
  border: initial;
@@ -115,6 +131,11 @@ input[type="file"] {
115
131
  line-height: 28px;
116
132
  }
117
133
 
134
+ // Reset line-height for IE
135
+ input[type="file"] {
136
+ line-height: 18px \9;
137
+ }
138
+
118
139
  // Chrome on Linux and Mobile Safari need background-color
119
140
  select {
120
141
  width: 220px; // default input width + 10px of padding that doesn't get applied
@@ -165,9 +186,11 @@ input[type="hidden"] {
165
186
  }
166
187
 
167
188
  // Radios and checkboxes on same line
189
+ // TODO v3: Convert .inline to .control-inline
168
190
  .radio.inline,
169
191
  .checkbox.inline {
170
192
  display: inline-block;
193
+ padding-top: 5px;
171
194
  margin-bottom: 0;
172
195
  vertical-align: middle;
173
196
  }
@@ -175,11 +198,6 @@ input[type="hidden"] {
175
198
  .checkbox.inline + .checkbox.inline {
176
199
  margin-left: 10px; // space out consecutive inline controls
177
200
  }
178
- // But don't forget to remove their padding on first-child
179
- .controls > .radio.inline:first-child,
180
- .controls > .checkbox.inline:first-child {
181
- padding-top: 0;
182
- }
183
201
 
184
202
 
185
203
 
@@ -198,9 +216,10 @@ textarea:focus {
198
216
  @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
199
217
  .box-shadow(@shadow);
200
218
  outline: 0;
201
- outline: thin dotted \9; /* IE6-8 */
219
+ outline: thin dotted \9; /* IE6-9 */
202
220
  }
203
221
  input[type="file"]:focus,
222
+ input[type="radio"]:focus,
204
223
  input[type="checkbox"]:focus,
205
224
  select:focus {
206
225
  .box-shadow(none); // override for file inputs
@@ -260,33 +279,6 @@ textarea[readonly] {
260
279
  // FORM FIELD FEEDBACK STATES
261
280
  // --------------------------
262
281
 
263
- // Mixin for form field states
264
- .formFieldState(@textColor: #555, @borderColor: #ccc, @backgroundColor: #f5f5f5) {
265
- // Set the text color
266
- > label,
267
- .help-block,
268
- .help-inline {
269
- color: @textColor;
270
- }
271
- // Style inputs accordingly
272
- input,
273
- select,
274
- textarea {
275
- color: @textColor;
276
- border-color: @borderColor;
277
- &:focus {
278
- border-color: darken(@borderColor, 10%);
279
- .box-shadow(0 0 6px lighten(@borderColor, 20%));
280
- }
281
- }
282
- // Give a small background color for input-prepend/-append
283
- .input-prepend .add-on,
284
- .input-append .add-on {
285
- color: @textColor;
286
- background-color: @backgroundColor;
287
- border-color: @textColor;
288
- }
289
- }
290
282
  // Warning
291
283
  .control-group.warning {
292
284
  .formFieldState(@warningText, @warningText, @warningBackground);
@@ -344,6 +336,7 @@ select:focus:required:invalid {
344
336
  // ---------
345
337
 
346
338
  .help-block {
339
+ display: block; // account for any element using help-block
347
340
  margin-top: 5px;
348
341
  margin-bottom: 0;
349
342
  color: @grayLight;
@@ -412,6 +405,7 @@ select:focus:required:invalid {
412
405
  .border-radius(3px 0 0 3px);
413
406
  }
414
407
  .uneditable-input {
408
+ border-left-color: #eee;
415
409
  border-right-color: #ccc;
416
410
  }
417
411
  .add-on {
@@ -461,6 +455,10 @@ select:focus:required:invalid {
461
455
  display: inline-block;
462
456
  margin-bottom: 0;
463
457
  }
458
+ // Re-hide hidden elements due to specifity
459
+ .hide {
460
+ display: none;
461
+ }
464
462
  }
465
463
  .form-search label,
466
464
  .form-inline label,
@@ -477,28 +475,37 @@ select:focus:required:invalid {
477
475
  .form-inline .input-prepend .add-on {
478
476
  vertical-align: middle;
479
477
  }
478
+ // Inline checkbox/radio labels
479
+ .form-search .radio,
480
+ .form-inline .radio,
481
+ .form-search .checkbox,
482
+ .form-inline .checkbox {
483
+ margin-bottom: 0;
484
+ vertical-align: middle;
485
+ }
480
486
 
481
487
  // Margin to space out fieldsets
482
488
  .control-group {
483
489
  margin-bottom: @baseLineHeight / 2;
484
490
  }
485
491
 
492
+ // Legend collapses margin, so next element is responsible for spacing
493
+ legend + .control-group {
494
+ margin-top: @baseLineHeight;
495
+ -webkit-margin-top-collapse: separate;
496
+ }
497
+
486
498
  // Horizontal-specific styles
487
499
  // --------------------------
488
500
 
489
501
  .form-horizontal {
490
- // Legend collapses margin, so we're relegated to padding
491
- legend + .control-group {
492
- margin-top: @baseLineHeight;
493
- -webkit-margin-top-collapse: separate;
494
- }
495
502
  // Increase spacing between groups
496
503
  .control-group {
497
504
  margin-bottom: @baseLineHeight;
498
505
  .clearfix();
499
506
  }
500
507
  // Float the labels left
501
- .control-group > label {
508
+ .control-label {
502
509
  float: left;
503
510
  width: 140px;
504
511
  padding-top: 5px;
File without changes
File without changes
@@ -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
  .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%); }
File without changes
@@ -9,7 +9,7 @@
9
9
  // Clearfix
10
10
  // --------
11
11
  // For clearing floats like a boss h5bp.com/q
12
- .clearfix() {
12
+ .clearfix {
13
13
  *zoom: 1;
14
14
  &:before,
15
15
  &:after {
@@ -25,7 +25,7 @@
25
25
  // ------------------
26
26
  .tab-focus() {
27
27
  // Default
28
- outline: thin dotted;
28
+ outline: thin dotted #333;
29
29
  // Webkit
30
30
  outline: 5px auto -webkit-focus-ring-color;
31
31
  outline-offset: -2px;
@@ -89,6 +89,15 @@
89
89
  }
90
90
  }
91
91
 
92
+ // Text overflow
93
+ // -------------------------
94
+ // Requires inline-block or block for proper styling
95
+ .text-overflow() {
96
+ overflow: hidden;
97
+ text-overflow: ellipsis;
98
+ white-space: nowrap;
99
+ }
100
+
92
101
 
93
102
 
94
103
  // FONTS
@@ -199,13 +208,13 @@
199
208
  // Setup the mixins to be used
200
209
  .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, @columns) {
201
210
  width: 1% * (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1));
202
- }
211
+ }
203
212
  .gridColumn(@fluidGridGutterWidth) {
204
213
  float: left;
205
214
  margin-left: @fluidGridGutterWidth;
206
215
  }
207
216
  // Take these values and mixins, and make 'em do their thang
208
- .generate(@gridColumns, @fluidGridColumnWidth, @fluidGridGutterWidth) {
217
+ .generate(@gridColumns, @fluidGridColumnWidth, @fluidGridGutterWidth) {
209
218
  // Row surrounds the columns
210
219
  .row-fluid {
211
220
  width: 100%;
@@ -219,24 +228,22 @@
219
228
  margin-left: 0;
220
229
  }
221
230
  // Default columns
222
- .span1 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 1); }
223
- .span2 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 2); }
224
- .span3 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 3); }
225
- .span4 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 4); }
226
- .span5 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 5); }
227
- .span6 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 6); }
228
- .span7 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 7); }
229
- .span8 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 8); }
230
- .span9 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 9); }
231
- .span10 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 10); }
232
- .span11 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 11); }
233
- .span12 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 12); }
231
+ > .span1 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 1); }
232
+ > .span2 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 2); }
233
+ > .span3 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 3); }
234
+ > .span4 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 4); }
235
+ > .span5 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 5); }
236
+ > .span6 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 6); }
237
+ > .span7 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 7); }
238
+ > .span8 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 8); }
239
+ > .span9 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 9); }
240
+ > .span10 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 10); }
241
+ > .span11 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 11); }
242
+ > .span12 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 12); }
234
243
  }
235
244
  }
236
245
  }
237
246
 
238
-
239
-
240
247
  // Input grid system
241
248
  // -------------------------
242
249
  #inputGridSystem {
@@ -263,6 +270,52 @@
263
270
  }
264
271
  }
265
272
 
273
+ // Make a Grid
274
+ // -------------------------
275
+ // Use .makeRow and .makeColumn to assign semantic layouts grid system behavior
276
+ .makeRow() {
277
+ margin-left: @gridGutterWidth * -1;
278
+ .clearfix();
279
+ }
280
+ .makeColumn(@columns: 1) {
281
+ float: left;
282
+ margin-left: @gridGutterWidth;
283
+ width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1));
284
+ }
285
+
286
+
287
+
288
+ // Form field states (used in forms.less)
289
+ // --------------------------------------------------
290
+
291
+ // Mixin for form field states
292
+ .formFieldState(@textColor: #555, @borderColor: #ccc, @backgroundColor: #f5f5f5) {
293
+ // Set the text color
294
+ > label,
295
+ .help-block,
296
+ .help-inline {
297
+ color: @textColor;
298
+ }
299
+ // Style inputs accordingly
300
+ input,
301
+ select,
302
+ textarea {
303
+ color: @textColor;
304
+ border-color: @borderColor;
305
+ &:focus {
306
+ border-color: darken(@borderColor, 10%);
307
+ .box-shadow(0 0 6px lighten(@borderColor, 20%));
308
+ }
309
+ }
310
+ // Give a small background color for input-prepend/-append
311
+ .input-prepend .add-on,
312
+ .input-append .add-on {
313
+ color: @textColor;
314
+ background-color: @backgroundColor;
315
+ border-color: @textColor;
316
+ }
317
+ }
318
+
266
319
 
267
320
 
268
321
  // CSS3 PROPERTIES
@@ -313,13 +366,6 @@
313
366
  -o-transform: translate(@x, @y);
314
367
  transform: translate(@x, @y);
315
368
  }
316
- .skew(@x: 0, @y: 0) {
317
- -webkit-transform: translate(@x, @y);
318
- -moz-transform: translate(@x, @y);
319
- -ms-transform: translate(@x, @y);
320
- -o-transform: translate(@x, @y);
321
- transform: translate(@x, @y);
322
- }
323
369
  .skew(@x: 0, @y: 0) {
324
370
  -webkit-transform: skew(@x, @y);
325
371
  -moz-transform: skew(@x, @y);
@@ -327,6 +373,13 @@
327
373
  -o-transform: skew(@x, @y);
328
374
  transform: skew(@x, @y);
329
375
  }
376
+ .translate3d(@x: 0, @y: 0, @z: 0) {
377
+ -webkit-transform: translate(@x, @y, @z);
378
+ -moz-transform: translate(@x, @y, @z);
379
+ -ms-transform: translate(@x, @y, @z);
380
+ -o-transform: translate(@x, @y, @z);
381
+ transform: translate(@x, @y, @z);
382
+ }
330
383
 
331
384
  // Background clipping
332
385
  // Heads up: FF 3.6 and under need "padding" instead of "padding-box"