twitter-bootstrap-rails 2.0.3 → 2.0.4
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.
Potentially problematic release.
This version of twitter-bootstrap-rails might be problematic. Click here for more details.
- data/README.md +22 -2
- data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +2 -0
- data/lib/generators/bootstrap/layout/templates/layout.html.erb +6 -12
- data/lib/generators/bootstrap/layout/templates/layout.html.haml +0 -5
- data/lib/generators/bootstrap/layout/templates/layout.html.slim +1 -6
- data/lib/generators/bootstrap/themed/templates/_form.html.erb +1 -1
- data/lib/generators/bootstrap/themed/templates/_form.html.haml +13 -11
- data/lib/generators/bootstrap/themed/templates/edit.html.haml +1 -2
- data/lib/generators/bootstrap/themed/templates/edit.html.slim +1 -1
- data/lib/generators/bootstrap/themed/templates/index.html.haml +3 -3
- data/lib/generators/bootstrap/themed/templates/new.html.haml +1 -1
- data/lib/generators/bootstrap/themed/templates/new.html.slim +1 -1
- data/lib/generators/bootstrap/themed/templates/show.html.haml +1 -1
- data/lib/generators/bootstrap/themed/themed_generator.rb +4 -4
- data/lib/twitter/bootstrap/rails/engine.rb +9 -3
- data/lib/twitter/bootstrap/rails/twitter-bootstrap-breadcrumbs.rb +25 -0
- data/lib/twitter/bootstrap/rails/version.rb +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js +4 -2
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +7 -3
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +4 -2
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +2 -2
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +7 -7
- data/vendor/toolkit/twitter/bootstrap/alerts.less +2 -14
- data/vendor/toolkit/twitter/bootstrap/badges.less +36 -0
- data/vendor/toolkit/twitter/bootstrap/bootstrap.less +2 -1
- data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +2 -0
- data/vendor/toolkit/twitter/bootstrap/button-groups.less +31 -7
- data/vendor/toolkit/twitter/bootstrap/buttons.less +17 -13
- data/vendor/toolkit/twitter/bootstrap/code.less +2 -2
- data/vendor/toolkit/twitter/bootstrap/component-animations.less +4 -2
- data/vendor/toolkit/twitter/bootstrap/dropdowns.less +45 -27
- data/vendor/toolkit/twitter/bootstrap/forms.less +78 -45
- data/vendor/toolkit/twitter/bootstrap/grid.less +2 -5
- data/vendor/toolkit/twitter/bootstrap/hero-unit.less +3 -1
- data/vendor/toolkit/twitter/bootstrap/labels.less +8 -2
- data/vendor/toolkit/twitter/bootstrap/mixins.less +190 -166
- data/vendor/toolkit/twitter/bootstrap/modals.less +12 -5
- data/vendor/toolkit/twitter/bootstrap/navbar.less +77 -35
- data/vendor/toolkit/twitter/bootstrap/navs.less +19 -9
- data/vendor/toolkit/twitter/bootstrap/pager.less +6 -0
- data/vendor/toolkit/twitter/bootstrap/pagination.less +1 -0
- data/vendor/toolkit/twitter/bootstrap/progress-bars.less +15 -1
- data/vendor/toolkit/twitter/bootstrap/reset.less +1 -1
- data/vendor/toolkit/twitter/bootstrap/responsive.less +72 -28
- data/vendor/toolkit/twitter/bootstrap/scaffolding.less +4 -4
- data/vendor/toolkit/twitter/bootstrap/sprites.less +1 -1
- data/vendor/toolkit/twitter/bootstrap/tables.less +26 -17
- data/vendor/toolkit/twitter/bootstrap/type.less +22 -6
- data/vendor/toolkit/twitter/bootstrap/variables.less +100 -6
- data/vendor/toolkit/twitter/bootstrap/wells.less +10 -0
- metadata +13 -11
@@ -48,7 +48,7 @@ input,
|
|
48
48
|
button,
|
49
49
|
select,
|
50
50
|
textarea {
|
51
|
-
|
51
|
+
font-family: @baseFontFamily; // And only set font-family here for those that need it (note the missing label element)
|
52
52
|
}
|
53
53
|
|
54
54
|
// Identify controls by their labels
|
@@ -71,7 +71,7 @@ select,
|
|
71
71
|
font-size: @baseFontSize;
|
72
72
|
line-height: @baseLineHeight;
|
73
73
|
color: @gray;
|
74
|
-
border: 1px solid
|
74
|
+
border: 1px solid @inputBorder;
|
75
75
|
.border-radius(3px);
|
76
76
|
}
|
77
77
|
.uneditable-textarea {
|
@@ -110,7 +110,7 @@ input[type="file"] {
|
|
110
110
|
padding: initial;
|
111
111
|
line-height: initial;
|
112
112
|
border: initial;
|
113
|
-
background-color: @
|
113
|
+
background-color: @inputBackground;
|
114
114
|
background-color: initial;
|
115
115
|
.box-shadow(none);
|
116
116
|
}
|
@@ -139,7 +139,7 @@ input[type="file"] {
|
|
139
139
|
// Chrome on Linux and Mobile Safari need background-color
|
140
140
|
select {
|
141
141
|
width: 220px; // default input width + 10px of padding that doesn't get applied
|
142
|
-
background-color: @
|
142
|
+
background-color: @inputBackground;
|
143
143
|
}
|
144
144
|
|
145
145
|
// Make multiple select elements height not fixed
|
@@ -253,7 +253,7 @@ textarea[class*="span"],
|
|
253
253
|
// GRID SIZING FOR INPUTS
|
254
254
|
// ----------------------
|
255
255
|
|
256
|
-
#
|
256
|
+
#grid > .input (@gridColumnWidth, @gridGutterWidth);
|
257
257
|
|
258
258
|
|
259
259
|
|
@@ -268,7 +268,7 @@ textarea[disabled],
|
|
268
268
|
input[readonly],
|
269
269
|
select[readonly],
|
270
270
|
textarea[readonly] {
|
271
|
-
background-color:
|
271
|
+
background-color: @inputDisabledBackground;
|
272
272
|
border-color: #ddd;
|
273
273
|
cursor: not-allowed;
|
274
274
|
}
|
@@ -301,7 +301,7 @@ select:focus:required:invalid {
|
|
301
301
|
border-color: #ee5f5b;
|
302
302
|
&:focus {
|
303
303
|
border-color: darken(#ee5f5b, 10%);
|
304
|
-
.box-shadow(0 0 6px lighten(#ee5f5b, 20%));
|
304
|
+
.box-shadow(0 0 6px lighten(#ee5f5b, 20%));
|
305
305
|
}
|
306
306
|
}
|
307
307
|
|
@@ -314,14 +314,15 @@ select:focus:required:invalid {
|
|
314
314
|
padding: (@baseLineHeight - 1) 20px @baseLineHeight;
|
315
315
|
margin-top: @baseLineHeight;
|
316
316
|
margin-bottom: @baseLineHeight;
|
317
|
-
background-color:
|
317
|
+
background-color: @grayLighter;
|
318
318
|
border-top: 1px solid #ddd;
|
319
|
+
.clearfix(); // Adding clearfix to allow for .pull-right button containers
|
319
320
|
}
|
320
321
|
|
321
322
|
// For text that needs to appear as an input but should not be an input
|
322
323
|
.uneditable-input {
|
323
324
|
display: block;
|
324
|
-
background-color: @
|
325
|
+
background-color: @inputBackground;
|
325
326
|
border-color: #eee;
|
326
327
|
.box-shadow(inset 0 1px 2px rgba(0,0,0,.025));
|
327
328
|
cursor: not-allowed;
|
@@ -335,17 +336,19 @@ select:focus:required:invalid {
|
|
335
336
|
// HELP TEXT
|
336
337
|
// ---------
|
337
338
|
|
339
|
+
.help-block,
|
340
|
+
.help-inline {
|
341
|
+
color: @gray; // lighten the text some for contrast
|
342
|
+
}
|
343
|
+
|
338
344
|
.help-block {
|
339
345
|
display: block; // account for any element using help-block
|
340
|
-
margin-
|
341
|
-
margin-bottom: 0;
|
342
|
-
color: @grayLight;
|
346
|
+
margin-bottom: @baseLineHeight / 2;
|
343
347
|
}
|
344
348
|
|
345
349
|
.help-inline {
|
346
350
|
display: inline-block;
|
347
351
|
.ie7-inline-block();
|
348
|
-
margin-bottom: 9px;
|
349
352
|
vertical-align: middle;
|
350
353
|
padding-left: 5px;
|
351
354
|
}
|
@@ -359,9 +362,10 @@ select:focus:required:invalid {
|
|
359
362
|
.input-prepend,
|
360
363
|
.input-append {
|
361
364
|
margin-bottom: 5px;
|
362
|
-
.clearfix(); // Clear the float to prevent wrapping
|
363
365
|
input,
|
366
|
+
select,
|
364
367
|
.uneditable-input {
|
368
|
+
*margin-left: 0;
|
365
369
|
.border-radius(0 3px 3px 0);
|
366
370
|
&:focus {
|
367
371
|
position: relative;
|
@@ -372,20 +376,21 @@ select:focus:required:invalid {
|
|
372
376
|
border-left-color: #ccc;
|
373
377
|
}
|
374
378
|
.add-on {
|
375
|
-
|
376
|
-
display: block;
|
379
|
+
display: inline-block;
|
377
380
|
width: auto;
|
378
381
|
min-width: 16px;
|
379
382
|
height: @baseLineHeight;
|
380
|
-
margin-right: -1px;
|
381
383
|
padding: 4px 5px;
|
382
384
|
font-weight: normal;
|
383
385
|
line-height: @baseLineHeight;
|
384
|
-
color: @grayLight;
|
385
386
|
text-align: center;
|
386
387
|
text-shadow: 0 1px 0 @white;
|
387
|
-
|
388
|
+
vertical-align: middle;
|
389
|
+
background-color: @grayLighter;
|
388
390
|
border: 1px solid #ccc;
|
391
|
+
}
|
392
|
+
.add-on,
|
393
|
+
.btn {
|
389
394
|
.border-radius(3px 0 0 3px);
|
390
395
|
}
|
391
396
|
.active {
|
@@ -394,33 +399,43 @@ select:focus:required:invalid {
|
|
394
399
|
}
|
395
400
|
}
|
396
401
|
.input-prepend {
|
397
|
-
.add-on
|
398
|
-
|
402
|
+
.add-on,
|
403
|
+
.btn {
|
404
|
+
margin-right: -1px;
|
399
405
|
}
|
400
406
|
}
|
401
407
|
.input-append {
|
402
408
|
input,
|
409
|
+
select
|
403
410
|
.uneditable-input {
|
404
|
-
float: left;
|
405
411
|
.border-radius(3px 0 0 3px);
|
406
412
|
}
|
407
413
|
.uneditable-input {
|
408
414
|
border-left-color: #eee;
|
409
|
-
border-right-color: #ccc;
|
415
|
+
border-right-color: #ccc;
|
410
416
|
}
|
411
|
-
.add-on
|
412
|
-
|
417
|
+
.add-on,
|
418
|
+
.btn {
|
413
419
|
margin-left: -1px;
|
414
420
|
.border-radius(0 3px 3px 0);
|
415
421
|
}
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
422
|
+
}
|
423
|
+
// Remove all border-radius for inputs with both prepend and append
|
424
|
+
.input-prepend.input-append {
|
425
|
+
input,
|
426
|
+
select,
|
427
|
+
.uneditable-input {
|
428
|
+
.border-radius(0);
|
429
|
+
}
|
430
|
+
.add-on:first-child,
|
431
|
+
.btn:first-child {
|
432
|
+
margin-right: -1px;
|
433
|
+
.border-radius(3px 0 0 3px);
|
434
|
+
}
|
435
|
+
.add-on:last-child,
|
436
|
+
.btn:last-child {
|
437
|
+
margin-left: -1px;
|
438
|
+
.border-radius(0 3px 3px 0);
|
424
439
|
}
|
425
440
|
}
|
426
441
|
|
@@ -451,7 +466,9 @@ select:focus:required:invalid {
|
|
451
466
|
textarea,
|
452
467
|
select,
|
453
468
|
.help-inline,
|
454
|
-
.uneditable-input
|
469
|
+
.uneditable-input,
|
470
|
+
.input-prepend,
|
471
|
+
.input-append {
|
455
472
|
display: inline-block;
|
456
473
|
margin-bottom: 0;
|
457
474
|
}
|
@@ -461,28 +478,35 @@ select:focus:required:invalid {
|
|
461
478
|
}
|
462
479
|
}
|
463
480
|
.form-search label,
|
464
|
-
.form-inline label
|
481
|
+
.form-inline label {
|
482
|
+
display: inline-block;
|
483
|
+
}
|
484
|
+
// Remove margin for input-prepend/-append
|
465
485
|
.form-search .input-append,
|
466
486
|
.form-inline .input-append,
|
467
487
|
.form-search .input-prepend,
|
468
488
|
.form-inline .input-prepend {
|
469
|
-
|
470
|
-
}
|
471
|
-
// Make the prepend and append add-on vertical-align: middle;
|
472
|
-
.form-search .input-append .add-on,
|
473
|
-
.form-inline .input-prepend .add-on,
|
474
|
-
.form-search .input-append .add-on,
|
475
|
-
.form-inline .input-prepend .add-on {
|
476
|
-
vertical-align: middle;
|
489
|
+
margin-bottom: 0;
|
477
490
|
}
|
478
|
-
// Inline checkbox/radio labels
|
491
|
+
// Inline checkbox/radio labels (remove padding on left)
|
479
492
|
.form-search .radio,
|
480
|
-
.form-inline .radio,
|
481
493
|
.form-search .checkbox,
|
494
|
+
.form-inline .radio,
|
482
495
|
.form-inline .checkbox {
|
496
|
+
padding-left: 0;
|
483
497
|
margin-bottom: 0;
|
484
498
|
vertical-align: middle;
|
485
499
|
}
|
500
|
+
// Remove float and margin, set to inline-block
|
501
|
+
.form-search .radio input[type="radio"],
|
502
|
+
.form-search .checkbox input[type="checkbox"],
|
503
|
+
.form-inline .radio input[type="radio"],
|
504
|
+
.form-inline .checkbox input[type="checkbox"] {
|
505
|
+
float: left;
|
506
|
+
margin-left: 0;
|
507
|
+
margin-right: 3px;
|
508
|
+
}
|
509
|
+
|
486
510
|
|
487
511
|
// Margin to space out fieldsets
|
488
512
|
.control-group {
|
@@ -514,6 +538,15 @@ legend + .control-group {
|
|
514
538
|
// Move over all input controls and content
|
515
539
|
.controls {
|
516
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 */
|
542
|
+
*display: inline-block;
|
543
|
+
*margin-left: 0;
|
544
|
+
*padding-left: 20px;
|
545
|
+
}
|
546
|
+
// Remove bottom margin on block level help text since that's accounted for on .control-group
|
547
|
+
.help-block {
|
548
|
+
margin-top: @baseLineHeight / 2;
|
549
|
+
margin-bottom: 0;
|
517
550
|
}
|
518
551
|
// Move over buttons in .form-actions to align with .controls
|
519
552
|
.form-actions {
|
@@ -1,8 +1,5 @@
|
|
1
|
-
// GRID SYSTEM
|
2
|
-
// -----------
|
3
|
-
|
4
1
|
// Fixed (940px)
|
5
|
-
#
|
2
|
+
#grid > .core(@gridColumnWidth, @gridGutterWidth);
|
6
3
|
|
7
4
|
// Fluid (940px)
|
8
|
-
#
|
5
|
+
#grid > .fluid(@fluidGridColumnWidth, @fluidGridGutterWidth);
|
@@ -4,17 +4,19 @@
|
|
4
4
|
.hero-unit {
|
5
5
|
padding: 60px;
|
6
6
|
margin-bottom: 30px;
|
7
|
-
background-color:
|
7
|
+
background-color: @heroUnitBackground;
|
8
8
|
.border-radius(6px);
|
9
9
|
h1 {
|
10
10
|
margin-bottom: 0;
|
11
11
|
font-size: 60px;
|
12
12
|
line-height: 1;
|
13
|
+
color: @heroUnitHeadingColor;
|
13
14
|
letter-spacing: -1px;
|
14
15
|
}
|
15
16
|
p {
|
16
17
|
font-size: 18px;
|
17
18
|
font-weight: 200;
|
18
19
|
line-height: @baseLineHeight * 1.5;
|
20
|
+
color: @heroUnitLeadColor;
|
19
21
|
}
|
20
22
|
}
|
@@ -3,10 +3,13 @@
|
|
3
3
|
|
4
4
|
// Base
|
5
5
|
.label {
|
6
|
-
padding:
|
7
|
-
font-size: @baseFontSize * .
|
6
|
+
padding: 1px 4px 2px;
|
7
|
+
font-size: @baseFontSize * .846;
|
8
8
|
font-weight: bold;
|
9
|
+
line-height: 13px; // ensure proper line-height if floated
|
9
10
|
color: @white;
|
11
|
+
vertical-align: middle;
|
12
|
+
white-space: nowrap;
|
10
13
|
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
|
11
14
|
background-color: @grayLight;
|
12
15
|
.border-radius(3px);
|
@@ -30,3 +33,6 @@
|
|
30
33
|
|
31
34
|
.label-info { background-color: @infoText; }
|
32
35
|
.label-info:hover { background-color: darken(@infoText, 10%); }
|
36
|
+
|
37
|
+
.label-inverse { background-color: @grayDark; }
|
38
|
+
.label-inverse:hover { background-color: darken(@grayDark, 10%); }
|
@@ -98,6 +98,14 @@
|
|
98
98
|
white-space: nowrap;
|
99
99
|
}
|
100
100
|
|
101
|
+
// New image replacement
|
102
|
+
// -------------------------
|
103
|
+
// Source: http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/
|
104
|
+
.hide-text {
|
105
|
+
overflow: hidden;
|
106
|
+
text-indent: 100%;
|
107
|
+
white-space: nowrap;
|
108
|
+
}
|
101
109
|
|
102
110
|
|
103
111
|
// FONTS
|
@@ -135,159 +143,19 @@
|
|
135
143
|
}
|
136
144
|
|
137
145
|
|
138
|
-
|
139
|
-
// GRID SYSTEM
|
146
|
+
// FORMS
|
140
147
|
// --------------------------------------------------
|
141
148
|
|
142
|
-
//
|
143
|
-
|
144
|
-
|
145
|
-
width:
|
146
|
-
|
147
|
-
|
148
|
-
.
|
149
|
-
}
|
150
|
-
|
151
|
-
// Le grid system
|
152
|
-
// -------------------------
|
153
|
-
#gridSystem {
|
154
|
-
// Setup the mixins to be used
|
155
|
-
.columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, @columns) {
|
156
|
-
width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1));
|
157
|
-
}
|
158
|
-
.offset(@gridColumnWidth, @gridGutterWidth, @columns) {
|
159
|
-
margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2);
|
160
|
-
}
|
161
|
-
.gridColumn(@gridGutterWidth) {
|
162
|
-
float: left;
|
163
|
-
margin-left: @gridGutterWidth;
|
164
|
-
}
|
165
|
-
// Take these values and mixins, and make 'em do their thang
|
166
|
-
.generate(@gridColumns, @gridColumnWidth, @gridGutterWidth) {
|
167
|
-
// Row surrounds the columns
|
168
|
-
.row {
|
169
|
-
margin-left: @gridGutterWidth * -1;
|
170
|
-
.clearfix();
|
171
|
-
}
|
172
|
-
// Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7, thanks @dhg)
|
173
|
-
[class*="span"] {
|
174
|
-
#gridSystem > .gridColumn(@gridGutterWidth);
|
175
|
-
}
|
176
|
-
// Default columns
|
177
|
-
.span1 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 1); }
|
178
|
-
.span2 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 2); }
|
179
|
-
.span3 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 3); }
|
180
|
-
.span4 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 4); }
|
181
|
-
.span5 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 5); }
|
182
|
-
.span6 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 6); }
|
183
|
-
.span7 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 7); }
|
184
|
-
.span8 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 8); }
|
185
|
-
.span9 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 9); }
|
186
|
-
.span10 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 10); }
|
187
|
-
.span11 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 11); }
|
188
|
-
.span12,
|
189
|
-
.container { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 12); }
|
190
|
-
// Offset column options
|
191
|
-
.offset1 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 1); }
|
192
|
-
.offset2 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 2); }
|
193
|
-
.offset3 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 3); }
|
194
|
-
.offset4 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 4); }
|
195
|
-
.offset5 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 5); }
|
196
|
-
.offset6 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 6); }
|
197
|
-
.offset7 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 7); }
|
198
|
-
.offset8 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 8); }
|
199
|
-
.offset9 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 9); }
|
200
|
-
.offset10 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 10); }
|
201
|
-
.offset11 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 11); }
|
202
|
-
}
|
203
|
-
}
|
204
|
-
|
205
|
-
// Fluid grid system
|
206
|
-
// -------------------------
|
207
|
-
#fluidGridSystem {
|
208
|
-
// Setup the mixins to be used
|
209
|
-
.columns(@fluidGridGutterWidth, @fluidGridColumnWidth, @columns) {
|
210
|
-
width: 1% * (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1));
|
211
|
-
}
|
212
|
-
.gridColumn(@fluidGridGutterWidth) {
|
213
|
-
float: left;
|
214
|
-
margin-left: @fluidGridGutterWidth;
|
215
|
-
}
|
216
|
-
// Take these values and mixins, and make 'em do their thang
|
217
|
-
.generate(@gridColumns, @fluidGridColumnWidth, @fluidGridGutterWidth) {
|
218
|
-
// Row surrounds the columns
|
219
|
-
.row-fluid {
|
220
|
-
width: 100%;
|
221
|
-
.clearfix();
|
222
|
-
|
223
|
-
// Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7, thanks @dhg)
|
224
|
-
> [class*="span"] {
|
225
|
-
#fluidGridSystem > .gridColumn(@fluidGridGutterWidth);
|
226
|
-
}
|
227
|
-
> [class*="span"]:first-child {
|
228
|
-
margin-left: 0;
|
229
|
-
}
|
230
|
-
// Default columns
|
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); }
|
243
|
-
}
|
244
|
-
}
|
245
|
-
}
|
246
|
-
|
247
|
-
// Input grid system
|
248
|
-
// -------------------------
|
249
|
-
#inputGridSystem {
|
250
|
-
.inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, @columns) {
|
251
|
-
width: ((@gridColumnWidth) * @columns) + (@gridGutterWidth * (@columns - 1)) - 10;
|
252
|
-
}
|
253
|
-
.generate(@gridColumns, @gridColumnWidth, @gridGutterWidth) {
|
254
|
-
input,
|
255
|
-
textarea,
|
256
|
-
.uneditable-input {
|
257
|
-
&.span1 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 1); }
|
258
|
-
&.span2 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 2); }
|
259
|
-
&.span3 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 3); }
|
260
|
-
&.span4 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 4); }
|
261
|
-
&.span5 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 5); }
|
262
|
-
&.span6 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 6); }
|
263
|
-
&.span7 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 7); }
|
264
|
-
&.span8 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 8); }
|
265
|
-
&.span9 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 9); }
|
266
|
-
&.span10 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 10); }
|
267
|
-
&.span11 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 11); }
|
268
|
-
&.span12 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 12); }
|
269
|
-
}
|
270
|
-
}
|
271
|
-
}
|
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));
|
149
|
+
// Block level inputs
|
150
|
+
.input-block-level {
|
151
|
+
display: block;
|
152
|
+
width: 100%;
|
153
|
+
min-height: 28px; /* Make inputs at least the height of their button counterpart */
|
154
|
+
/* Makes inputs behave like true block-level elements */
|
155
|
+
.box-sizing(border-box);
|
284
156
|
}
|
285
157
|
|
286
158
|
|
287
|
-
|
288
|
-
// Form field states (used in forms.less)
|
289
|
-
// --------------------------------------------------
|
290
|
-
|
291
159
|
// Mixin for form field states
|
292
160
|
.formFieldState(@textColor: #555, @borderColor: #ccc, @backgroundColor: #f5f5f5) {
|
293
161
|
// Set the text color
|
@@ -402,6 +270,7 @@
|
|
402
270
|
.box-sizing(@boxmodel) {
|
403
271
|
-webkit-box-sizing: @boxmodel;
|
404
272
|
-moz-box-sizing: @boxmodel;
|
273
|
+
-ms-box-sizing: @boxmodel;
|
405
274
|
box-sizing: @boxmodel;
|
406
275
|
}
|
407
276
|
|
@@ -433,7 +302,7 @@
|
|
433
302
|
// Opacity
|
434
303
|
.opacity(@opacity: 100) {
|
435
304
|
opacity: @opacity / 100;
|
436
|
-
filter:
|
305
|
+
filter: ~"alpha(opacity=@{opacity})";
|
437
306
|
}
|
438
307
|
|
439
308
|
|
@@ -509,8 +378,8 @@
|
|
509
378
|
background-image: -webkit-radial-gradient(circle, @innerColor, @outerColor);
|
510
379
|
background-image: -moz-radial-gradient(circle, @innerColor, @outerColor);
|
511
380
|
background-image: -ms-radial-gradient(circle, @innerColor, @outerColor);
|
381
|
+
background-image: -o-radial-gradient(circle, @innerColor, @outerColor);
|
512
382
|
background-repeat: no-repeat;
|
513
|
-
// Opera cannot do radial gradients yet
|
514
383
|
}
|
515
384
|
.striped(@color, @angle: -45deg) {
|
516
385
|
background-color: @color;
|
@@ -519,17 +388,39 @@
|
|
519
388
|
background-image: -moz-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
|
520
389
|
background-image: -ms-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
|
521
390
|
background-image: -o-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
|
522
|
-
background-image: linear-gradient(@angle, rgba(255,255,255,.15) 25%,
|
391
|
+
background-image: linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
|
523
392
|
}
|
524
393
|
}
|
525
394
|
// Reset filters for IE
|
526
395
|
.reset-filter() {
|
527
|
-
filter:
|
396
|
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
528
397
|
}
|
529
398
|
|
530
399
|
|
531
|
-
|
532
|
-
//
|
400
|
+
|
401
|
+
// COMPONENT MIXINS
|
402
|
+
// --------------------------------------------------
|
403
|
+
|
404
|
+
// Horizontal dividers
|
405
|
+
// -------------------------
|
406
|
+
// Dividers (basically an hr) within dropdowns and nav lists
|
407
|
+
.nav-divider() {
|
408
|
+
height: 1px;
|
409
|
+
margin: ((@baseLineHeight / 2) - 1) 1px; // 8px 1px
|
410
|
+
overflow: hidden;
|
411
|
+
background-color: #e5e5e5;
|
412
|
+
border-bottom: 1px solid @white;
|
413
|
+
|
414
|
+
// IE7 needs a set width since we gave a height. Restricting just
|
415
|
+
// to IE7 to keep the 1px left/right space in other browsers.
|
416
|
+
// It is unclear where IE is getting the extra space that we need
|
417
|
+
// to negative-margin away, but so it goes.
|
418
|
+
*width: 100%;
|
419
|
+
*margin: -5px 0 5px;
|
420
|
+
}
|
421
|
+
|
422
|
+
// Button backgrounds
|
423
|
+
// ------------------
|
533
424
|
.buttonBackground(@startColor, @endColor) {
|
534
425
|
// gradientBar will set the background to a pleasing blend of these, to support IE<=9
|
535
426
|
.gradientBar(@startColor, @endColor);
|
@@ -547,44 +438,177 @@
|
|
547
438
|
}
|
548
439
|
}
|
549
440
|
|
441
|
+
// Navbar vertical align
|
442
|
+
// -------------------------
|
443
|
+
// Vertically center elements in the navbar.
|
444
|
+
// Example: an element has a height of 30px, so write out `.navbarVerticalAlign(30px);` to calculate the appropriate top margin.
|
445
|
+
.navbarVerticalAlign(@elementHeight) {
|
446
|
+
margin-top: (@navbarHeight - @elementHeight) / 2;
|
447
|
+
}
|
550
448
|
|
551
|
-
//
|
552
|
-
// --------------------------------------------------
|
553
|
-
|
554
|
-
// POPOVER ARROWS
|
449
|
+
// Popover arrows
|
555
450
|
// -------------------------
|
556
451
|
// For tipsies and popovers
|
557
452
|
#popoverArrow {
|
558
|
-
.top(@arrowWidth: 5px) {
|
453
|
+
.top(@arrowWidth: 5px, @color: @black) {
|
559
454
|
bottom: 0;
|
560
455
|
left: 50%;
|
561
456
|
margin-left: -@arrowWidth;
|
562
457
|
border-left: @arrowWidth solid transparent;
|
563
458
|
border-right: @arrowWidth solid transparent;
|
564
|
-
border-top: @arrowWidth solid @
|
459
|
+
border-top: @arrowWidth solid @color;
|
565
460
|
}
|
566
|
-
.left(@arrowWidth: 5px) {
|
461
|
+
.left(@arrowWidth: 5px, @color: @black) {
|
567
462
|
top: 50%;
|
568
463
|
right: 0;
|
569
464
|
margin-top: -@arrowWidth;
|
570
465
|
border-top: @arrowWidth solid transparent;
|
571
466
|
border-bottom: @arrowWidth solid transparent;
|
572
|
-
border-left: @arrowWidth solid @
|
467
|
+
border-left: @arrowWidth solid @color;
|
573
468
|
}
|
574
|
-
.bottom(@arrowWidth: 5px) {
|
469
|
+
.bottom(@arrowWidth: 5px, @color: @black) {
|
575
470
|
top: 0;
|
576
471
|
left: 50%;
|
577
472
|
margin-left: -@arrowWidth;
|
578
473
|
border-left: @arrowWidth solid transparent;
|
579
474
|
border-right: @arrowWidth solid transparent;
|
580
|
-
border-bottom: @arrowWidth solid @
|
475
|
+
border-bottom: @arrowWidth solid @color;
|
581
476
|
}
|
582
|
-
.right(@arrowWidth: 5px) {
|
477
|
+
.right(@arrowWidth: 5px, @color: @black) {
|
583
478
|
top: 50%;
|
584
479
|
left: 0;
|
585
480
|
margin-top: -@arrowWidth;
|
586
481
|
border-top: @arrowWidth solid transparent;
|
587
482
|
border-bottom: @arrowWidth solid transparent;
|
588
|
-
border-right: @arrowWidth solid @
|
483
|
+
border-right: @arrowWidth solid @color;
|
589
484
|
}
|
590
485
|
}
|
486
|
+
|
487
|
+
// Grid System
|
488
|
+
// -----------
|
489
|
+
|
490
|
+
// Centered container element
|
491
|
+
.container-fixed() {
|
492
|
+
margin-left: auto;
|
493
|
+
margin-right: auto;
|
494
|
+
.clearfix();
|
495
|
+
}
|
496
|
+
|
497
|
+
// Table columns
|
498
|
+
.tableColumns(@columnSpan: 1) {
|
499
|
+
float: none; // undo default grid column styles
|
500
|
+
width: ((@gridColumnWidth) * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)) - 16; // 16 is total padding on left and right of table cells
|
501
|
+
margin-left: 0; // undo default grid column styles
|
502
|
+
}
|
503
|
+
|
504
|
+
// Make a Grid
|
505
|
+
// Use .makeRow and .makeColumn to assign semantic layouts grid system behavior
|
506
|
+
.makeRow() {
|
507
|
+
margin-left: @gridGutterWidth * -1;
|
508
|
+
.clearfix();
|
509
|
+
}
|
510
|
+
.makeColumn(@columns: 1) {
|
511
|
+
float: left;
|
512
|
+
margin-left: @gridGutterWidth;
|
513
|
+
width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1));
|
514
|
+
}
|
515
|
+
|
516
|
+
// The Grid
|
517
|
+
#grid {
|
518
|
+
|
519
|
+
.core (@gridColumnWidth, @gridGutterWidth) {
|
520
|
+
|
521
|
+
.spanX (@index) when (@index > 0) {
|
522
|
+
(~".span@{index}") { .span(@index); }
|
523
|
+
.spanX(@index - 1);
|
524
|
+
}
|
525
|
+
.spanX (0) {}
|
526
|
+
|
527
|
+
.offsetX (@index) when (@index > 0) {
|
528
|
+
(~".offset@{index}") { .offset(@index); }
|
529
|
+
.offsetX(@index - 1);
|
530
|
+
}
|
531
|
+
.offsetX (0) {}
|
532
|
+
|
533
|
+
.offset (@columns) {
|
534
|
+
margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2);
|
535
|
+
}
|
536
|
+
|
537
|
+
.span (@columns) {
|
538
|
+
width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1));
|
539
|
+
}
|
540
|
+
|
541
|
+
.row {
|
542
|
+
margin-left: @gridGutterWidth * -1;
|
543
|
+
.clearfix();
|
544
|
+
}
|
545
|
+
|
546
|
+
[class*="span"] {
|
547
|
+
float: left;
|
548
|
+
margin-left: @gridGutterWidth;
|
549
|
+
}
|
550
|
+
|
551
|
+
// Set the container width, and override it for fixed navbars in media queries
|
552
|
+
.container,
|
553
|
+
.navbar-fixed-top .container,
|
554
|
+
.navbar-fixed-bottom .container { .span(@gridColumns); }
|
555
|
+
|
556
|
+
// generate .spanX and .offsetX
|
557
|
+
.spanX (@gridColumns);
|
558
|
+
.offsetX (@gridColumns);
|
559
|
+
|
560
|
+
}
|
561
|
+
|
562
|
+
.fluid (@fluidGridColumnWidth, @fluidGridGutterWidth) {
|
563
|
+
|
564
|
+
.spanX (@index) when (@index > 0) {
|
565
|
+
(~"> .span@{index}") { .span(@index); }
|
566
|
+
.spanX(@index - 1);
|
567
|
+
}
|
568
|
+
.spanX (0) {}
|
569
|
+
|
570
|
+
.span (@columns) {
|
571
|
+
width: (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1));
|
572
|
+
}
|
573
|
+
|
574
|
+
.row-fluid {
|
575
|
+
width: 100%;
|
576
|
+
.clearfix();
|
577
|
+
> [class*="span"] {
|
578
|
+
float: left;
|
579
|
+
margin-left: @fluidGridGutterWidth;
|
580
|
+
}
|
581
|
+
> [class*="span"]:first-child {
|
582
|
+
margin-left: 0;
|
583
|
+
}
|
584
|
+
|
585
|
+
// generate .spanX
|
586
|
+
.spanX (@gridColumns);
|
587
|
+
}
|
588
|
+
|
589
|
+
}
|
590
|
+
|
591
|
+
.input(@gridColumnWidth, @gridGutterWidth) {
|
592
|
+
|
593
|
+
.spanX (@index) when (@index > 0) {
|
594
|
+
(~"input.span@{index}, textarea.span@{index}, .uneditable-input.span@{index}") { .span(@index); }
|
595
|
+
.spanX(@index - 1);
|
596
|
+
}
|
597
|
+
.spanX (0) {}
|
598
|
+
|
599
|
+
.span(@columns) {
|
600
|
+
width: ((@gridColumnWidth) * @columns) + (@gridGutterWidth * (@columns - 1)) - 10;
|
601
|
+
}
|
602
|
+
|
603
|
+
input,
|
604
|
+
textarea,
|
605
|
+
.uneditable-input {
|
606
|
+
margin-left: 0; // override margin-left from core grid system
|
607
|
+
}
|
608
|
+
|
609
|
+
// generate .spanX
|
610
|
+
.spanX (@gridColumns);
|
611
|
+
|
612
|
+
}
|
613
|
+
|
614
|
+
}
|