twitter-bootstrap-rails 2.0.2 → 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.
Files changed (70) hide show
  1. data/README.md +34 -23
  2. data/lib/generators/bootstrap/install/install_generator.rb +36 -12
  3. data/lib/generators/bootstrap/install/templates/application.css +0 -1
  4. data/lib/generators/bootstrap/install/templates/bootstrap.coffee +1 -10
  5. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +19 -0
  6. data/lib/generators/bootstrap/layout/templates/layout.html.erb +18 -23
  7. data/lib/generators/bootstrap/layout/templates/layout.html.haml +4 -9
  8. data/lib/generators/bootstrap/layout/templates/layout.html.slim +4 -9
  9. data/lib/generators/bootstrap/themed/templates/_form.html.erb +19 -12
  10. data/lib/generators/bootstrap/themed/templates/_form.html.haml +13 -11
  11. data/lib/generators/bootstrap/themed/templates/edit.html.erb +1 -4
  12. data/lib/generators/bootstrap/themed/templates/edit.html.haml +1 -2
  13. data/lib/generators/bootstrap/themed/templates/edit.html.slim +1 -1
  14. data/lib/generators/bootstrap/themed/templates/index.html.erb +24 -28
  15. data/lib/generators/bootstrap/themed/templates/index.html.haml +3 -3
  16. data/lib/generators/bootstrap/themed/templates/new.html.erb +1 -3
  17. data/lib/generators/bootstrap/themed/templates/new.html.haml +1 -1
  18. data/lib/generators/bootstrap/themed/templates/new.html.slim +1 -1
  19. data/lib/generators/bootstrap/themed/templates/show.html.erb +11 -7
  20. data/lib/generators/bootstrap/themed/templates/show.html.haml +1 -1
  21. data/lib/generators/bootstrap/themed/themed_generator.rb +4 -4
  22. data/lib/twitter/bootstrap/rails/engine.rb +9 -3
  23. data/lib/twitter/bootstrap/rails/twitter-bootstrap-breadcrumbs.rb +25 -0
  24. data/lib/twitter/bootstrap/rails/version.rb +1 -1
  25. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +8 -5
  26. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js +5 -3
  27. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +9 -2
  28. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +5 -3
  29. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +2 -2
  30. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +6 -5
  31. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +2 -2
  32. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +2 -2
  33. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +2 -2
  34. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +3 -3
  35. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +3 -3
  36. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +8 -8
  37. data/vendor/toolkit/twitter/bootstrap/alerts.less +2 -14
  38. data/vendor/toolkit/twitter/bootstrap/badges.less +36 -0
  39. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +2 -1
  40. data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +3 -1
  41. data/vendor/toolkit/twitter/bootstrap/button-groups.less +34 -8
  42. data/vendor/toolkit/twitter/bootstrap/buttons.less +38 -16
  43. data/vendor/toolkit/twitter/bootstrap/code.less +15 -2
  44. data/vendor/toolkit/twitter/bootstrap/component-animations.less +4 -2
  45. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +46 -29
  46. data/vendor/toolkit/twitter/bootstrap/forms.less +120 -80
  47. data/vendor/toolkit/twitter/bootstrap/grid.less +2 -5
  48. data/vendor/toolkit/twitter/bootstrap/hero-unit.less +3 -1
  49. data/vendor/toolkit/twitter/bootstrap/labels.less +29 -7
  50. data/vendor/toolkit/twitter/bootstrap/mixins.less +233 -156
  51. data/vendor/toolkit/twitter/bootstrap/modals.less +22 -4
  52. data/vendor/toolkit/twitter/bootstrap/navbar.less +90 -41
  53. data/vendor/toolkit/twitter/bootstrap/navs.less +39 -20
  54. data/vendor/toolkit/twitter/bootstrap/pager.less +6 -0
  55. data/vendor/toolkit/twitter/bootstrap/pagination.less +1 -0
  56. data/vendor/toolkit/twitter/bootstrap/progress-bars.less +15 -1
  57. data/vendor/toolkit/twitter/bootstrap/reset.less +2 -2
  58. data/vendor/toolkit/twitter/bootstrap/responsive.less +80 -32
  59. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +4 -4
  60. data/vendor/toolkit/twitter/bootstrap/sprites.less +10 -8
  61. data/vendor/toolkit/twitter/bootstrap/tables.less +39 -19
  62. data/vendor/toolkit/twitter/bootstrap/thumbnails.less +2 -2
  63. data/vendor/toolkit/twitter/bootstrap/type.less +25 -8
  64. data/vendor/toolkit/twitter/bootstrap/variables.less +114 -12
  65. data/vendor/toolkit/twitter/bootstrap/wells.less +10 -0
  66. data/vendor/toolkit/twitter/bootstrap_base.less +2 -0
  67. metadata +15 -14
  68. data/lib/generators/bootstrap/install/templates/bootstrap.less +0 -6
  69. data/vendor/assets/stylesheets/twitter/bootstrap.css.less +0 -1
  70. data/vendor/toolkit/twitter/bootstrap.less +0 -1
@@ -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,23 @@
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
+
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
+ }
92
109
 
93
110
 
94
111
  // FONTS
@@ -126,140 +143,44 @@
126
143
  }
127
144
 
128
145
 
129
-
130
- // GRID SYSTEM
146
+ // FORMS
131
147
  // --------------------------------------------------
132
148
 
133
- // Site container
134
- // -------------------------
135
- .container-fixed() {
136
- width: @gridRowWidth;
137
- margin-left: auto;
138
- margin-right: auto;
139
- .clearfix();
140
- }
141
-
142
- // Le grid system
143
- // -------------------------
144
- #gridSystem {
145
- // Setup the mixins to be used
146
- .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, @columns) {
147
- width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1));
148
- }
149
- .offset(@gridColumnWidth, @gridGutterWidth, @columns) {
150
- margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2);
151
- }
152
- .gridColumn(@gridGutterWidth) {
153
- float: left;
154
- margin-left: @gridGutterWidth;
155
- }
156
- // Take these values and mixins, and make 'em do their thang
157
- .generate(@gridColumns, @gridColumnWidth, @gridGutterWidth) {
158
- // Row surrounds the columns
159
- .row {
160
- margin-left: @gridGutterWidth * -1;
161
- .clearfix();
162
- }
163
- // Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7, thanks @dhg)
164
- [class*="span"] {
165
- #gridSystem > .gridColumn(@gridGutterWidth);
166
- }
167
- // Default columns
168
- .span1 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 1); }
169
- .span2 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 2); }
170
- .span3 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 3); }
171
- .span4 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 4); }
172
- .span5 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 5); }
173
- .span6 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 6); }
174
- .span7 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 7); }
175
- .span8 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 8); }
176
- .span9 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 9); }
177
- .span10 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 10); }
178
- .span11 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 11); }
179
- .span12,
180
- .container { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 12); }
181
- // Offset column options
182
- .offset1 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 1); }
183
- .offset2 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 2); }
184
- .offset3 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 3); }
185
- .offset4 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 4); }
186
- .offset5 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 5); }
187
- .offset6 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 6); }
188
- .offset7 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 7); }
189
- .offset8 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 8); }
190
- .offset9 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 9); }
191
- .offset10 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 10); }
192
- .offset11 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 11); }
193
- }
194
- }
195
-
196
- // Fluid grid system
197
- // -------------------------
198
- #fluidGridSystem {
199
- // Setup the mixins to be used
200
- .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, @columns) {
201
- width: 1% * (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1));
202
- }
203
- .gridColumn(@fluidGridGutterWidth) {
204
- float: left;
205
- margin-left: @fluidGridGutterWidth;
206
- }
207
- // Take these values and mixins, and make 'em do their thang
208
- .generate(@gridColumns, @fluidGridColumnWidth, @fluidGridGutterWidth) {
209
- // Row surrounds the columns
210
- .row-fluid {
211
- width: 100%;
212
- .clearfix();
213
-
214
- // Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7, thanks @dhg)
215
- > [class*="span"] {
216
- #fluidGridSystem > .gridColumn(@fluidGridGutterWidth);
217
- }
218
- > [class*="span"]:first-child {
219
- margin-left: 0;
220
- }
221
- // 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); }
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);
156
+ }
157
+
158
+
159
+ // Mixin for form field states
160
+ .formFieldState(@textColor: #555, @borderColor: #ccc, @backgroundColor: #f5f5f5) {
161
+ // Set the text color
162
+ > label,
163
+ .help-block,
164
+ .help-inline {
165
+ color: @textColor;
166
+ }
167
+ // Style inputs accordingly
168
+ input,
169
+ select,
170
+ textarea {
171
+ color: @textColor;
172
+ border-color: @borderColor;
173
+ &:focus {
174
+ border-color: darken(@borderColor, 10%);
175
+ .box-shadow(0 0 6px lighten(@borderColor, 20%));
234
176
  }
235
177
  }
236
- }
237
-
238
-
239
-
240
- // Input grid system
241
- // -------------------------
242
- #inputGridSystem {
243
- .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, @columns) {
244
- width: ((@gridColumnWidth) * @columns) + (@gridGutterWidth * (@columns - 1)) - 10;
245
- }
246
- .generate(@gridColumns, @gridColumnWidth, @gridGutterWidth) {
247
- input,
248
- textarea,
249
- .uneditable-input {
250
- &.span1 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 1); }
251
- &.span2 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 2); }
252
- &.span3 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 3); }
253
- &.span4 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 4); }
254
- &.span5 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 5); }
255
- &.span6 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 6); }
256
- &.span7 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 7); }
257
- &.span8 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 8); }
258
- &.span9 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 9); }
259
- &.span10 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 10); }
260
- &.span11 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 11); }
261
- &.span12 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 12); }
262
- }
178
+ // Give a small background color for input-prepend/-append
179
+ .input-prepend .add-on,
180
+ .input-append .add-on {
181
+ color: @textColor;
182
+ background-color: @backgroundColor;
183
+ border-color: @textColor;
263
184
  }
264
185
  }
265
186
 
@@ -313,13 +234,6 @@
313
234
  -o-transform: translate(@x, @y);
314
235
  transform: translate(@x, @y);
315
236
  }
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
237
  .skew(@x: 0, @y: 0) {
324
238
  -webkit-transform: skew(@x, @y);
325
239
  -moz-transform: skew(@x, @y);
@@ -327,6 +241,13 @@
327
241
  -o-transform: skew(@x, @y);
328
242
  transform: skew(@x, @y);
329
243
  }
244
+ .translate3d(@x: 0, @y: 0, @z: 0) {
245
+ -webkit-transform: translate(@x, @y, @z);
246
+ -moz-transform: translate(@x, @y, @z);
247
+ -ms-transform: translate(@x, @y, @z);
248
+ -o-transform: translate(@x, @y, @z);
249
+ transform: translate(@x, @y, @z);
250
+ }
330
251
 
331
252
  // Background clipping
332
253
  // Heads up: FF 3.6 and under need "padding" instead of "padding-box"
@@ -349,6 +270,7 @@
349
270
  .box-sizing(@boxmodel) {
350
271
  -webkit-box-sizing: @boxmodel;
351
272
  -moz-box-sizing: @boxmodel;
273
+ -ms-box-sizing: @boxmodel;
352
274
  box-sizing: @boxmodel;
353
275
  }
354
276
 
@@ -380,7 +302,7 @@
380
302
  // Opacity
381
303
  .opacity(@opacity: 100) {
382
304
  opacity: @opacity / 100;
383
- filter: e(%("alpha(opacity=%d)", @opacity));
305
+ filter: ~"alpha(opacity=@{opacity})";
384
306
  }
385
307
 
386
308
 
@@ -456,8 +378,8 @@
456
378
  background-image: -webkit-radial-gradient(circle, @innerColor, @outerColor);
457
379
  background-image: -moz-radial-gradient(circle, @innerColor, @outerColor);
458
380
  background-image: -ms-radial-gradient(circle, @innerColor, @outerColor);
381
+ background-image: -o-radial-gradient(circle, @innerColor, @outerColor);
459
382
  background-repeat: no-repeat;
460
- // Opera cannot do radial gradients yet
461
383
  }
462
384
  .striped(@color, @angle: -45deg) {
463
385
  background-color: @color;
@@ -471,12 +393,34 @@
471
393
  }
472
394
  // Reset filters for IE
473
395
  .reset-filter() {
474
- filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"));
396
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
475
397
  }
476
398
 
477
399
 
478
- // Mixin for generating button backgrounds
479
- // ---------------------------------------
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
+ // ------------------
480
424
  .buttonBackground(@startColor, @endColor) {
481
425
  // gradientBar will set the background to a pleasing blend of these, to support IE<=9
482
426
  .gradientBar(@startColor, @endColor);
@@ -494,44 +438,177 @@
494
438
  }
495
439
  }
496
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
+ }
497
448
 
498
- // COMPONENT MIXINS
499
- // --------------------------------------------------
500
-
501
- // POPOVER ARROWS
449
+ // Popover arrows
502
450
  // -------------------------
503
451
  // For tipsies and popovers
504
452
  #popoverArrow {
505
- .top(@arrowWidth: 5px) {
453
+ .top(@arrowWidth: 5px, @color: @black) {
506
454
  bottom: 0;
507
455
  left: 50%;
508
456
  margin-left: -@arrowWidth;
509
457
  border-left: @arrowWidth solid transparent;
510
458
  border-right: @arrowWidth solid transparent;
511
- border-top: @arrowWidth solid @black;
459
+ border-top: @arrowWidth solid @color;
512
460
  }
513
- .left(@arrowWidth: 5px) {
461
+ .left(@arrowWidth: 5px, @color: @black) {
514
462
  top: 50%;
515
463
  right: 0;
516
464
  margin-top: -@arrowWidth;
517
465
  border-top: @arrowWidth solid transparent;
518
466
  border-bottom: @arrowWidth solid transparent;
519
- border-left: @arrowWidth solid @black;
467
+ border-left: @arrowWidth solid @color;
520
468
  }
521
- .bottom(@arrowWidth: 5px) {
469
+ .bottom(@arrowWidth: 5px, @color: @black) {
522
470
  top: 0;
523
471
  left: 50%;
524
472
  margin-left: -@arrowWidth;
525
473
  border-left: @arrowWidth solid transparent;
526
474
  border-right: @arrowWidth solid transparent;
527
- border-bottom: @arrowWidth solid @black;
475
+ border-bottom: @arrowWidth solid @color;
528
476
  }
529
- .right(@arrowWidth: 5px) {
477
+ .right(@arrowWidth: 5px, @color: @black) {
530
478
  top: 50%;
531
479
  left: 0;
532
480
  margin-top: -@arrowWidth;
533
481
  border-top: @arrowWidth solid transparent;
534
482
  border-bottom: @arrowWidth solid transparent;
535
- border-right: @arrowWidth solid @black;
483
+ border-right: @arrowWidth solid @color;
484
+ }
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
+
536
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
+
537
614
  }
@@ -1,6 +1,7 @@
1
1
  // MODALS
2
2
  // ------
3
3
 
4
+ // Recalculate z-index where appropriate
4
5
  .modal-open {
5
6
  .dropdown-menu { z-index: @zindexDropdown + @zindexModal; }
6
7
  .dropdown.open { *z-index: @zindexDropdown + @zindexModal; }
@@ -8,6 +9,7 @@
8
9
  .tooltip { z-index: @zindexTooltip + @zindexModal; }
9
10
  }
10
11
 
12
+ // Background
11
13
  .modal-backdrop {
12
14
  position: fixed;
13
15
  top: 0;
@@ -25,12 +27,12 @@
25
27
  .opacity(80);
26
28
  }
27
29
 
30
+ // Base modal
28
31
  .modal {
29
32
  position: fixed;
30
33
  top: 50%;
31
34
  left: 50%;
32
35
  z-index: @zindexModal;
33
- max-height: 500px;
34
36
  overflow: auto;
35
37
  width: 560px;
36
38
  margin: -250px 0 0 -280px;
@@ -53,20 +55,36 @@
53
55
  // Close icon
54
56
  .close { margin-top: 2px; }
55
57
  }
58
+
59
+ // Body (where all modal content resises)
56
60
  .modal-body {
61
+ overflow-y: auto;
62
+ max-height: 400px;
57
63
  padding: 15px;
58
64
  }
65
+ // Remove bottom margin if need be
66
+ .modal-form {
67
+ margin-bottom: 0;
68
+ }
69
+
70
+ // Footer (for actions)
59
71
  .modal-footer {
60
72
  padding: 14px 15px 15px;
61
73
  margin-bottom: 0;
74
+ text-align: right; // right align buttons
62
75
  background-color: #f5f5f5;
63
76
  border-top: 1px solid #ddd;
64
77
  .border-radius(0 0 6px 6px);
65
78
  .box-shadow(inset 0 1px 0 @white);
66
- .clearfix();
67
- .btn {
68
- float: right;
79
+ .clearfix(); // clear it in case folks use .pull-* classes on buttons
80
+
81
+ // Properly space out buttons
82
+ .btn + .btn {
69
83
  margin-left: 5px;
70
84
  margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
71
85
  }
86
+ // but override that for button groups
87
+ .btn-group .btn + .btn {
88
+ margin-left: -1px;
89
+ }
72
90
  }