twitter-bootswatch-rails 3.1.1.1 → 3.2.0.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 (78) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/twitter/bootstrap/affix.js +19 -14
  3. data/app/assets/javascripts/twitter/bootstrap/alert.js +10 -6
  4. data/app/assets/javascripts/twitter/bootstrap/button.js +11 -8
  5. data/app/assets/javascripts/twitter/bootstrap/carousel.js +49 -31
  6. data/app/assets/javascripts/twitter/bootstrap/collapse.js +22 -22
  7. data/app/assets/javascripts/twitter/bootstrap/dropdown.js +17 -13
  8. data/app/assets/javascripts/twitter/bootstrap/modal.js +66 -29
  9. data/app/assets/javascripts/twitter/bootstrap/popover.js +10 -7
  10. data/app/assets/javascripts/twitter/bootstrap/scrollspy.js +40 -23
  11. data/app/assets/javascripts/twitter/bootstrap/tab.js +11 -8
  12. data/app/assets/javascripts/twitter/bootstrap/tooltip.js +115 -57
  13. data/app/assets/javascripts/twitter/bootstrap/transition.js +18 -7
  14. data/lib/generators/bootswatch/install/install_generator.rb +16 -5
  15. data/lib/generators/bootswatch/install/templates/bootstrap.less +3 -2
  16. data/lib/generators/bootswatch/install/templates/mixins.less.tt +35 -925
  17. data/lib/generators/bootswatch/install/templates/variables.less.tt +40 -23
  18. data/lib/twitter/bootswatch/rails/version.rb +1 -1
  19. data/vendor/toolkit/twitter/bootstrap/alerts.less +4 -3
  20. data/vendor/toolkit/twitter/bootstrap/badges.less +18 -18
  21. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +3 -2
  22. data/vendor/toolkit/twitter/bootstrap/button-groups.less +16 -2
  23. data/vendor/toolkit/twitter/bootstrap/buttons.less +0 -2
  24. data/vendor/toolkit/twitter/bootstrap/carousel.less +15 -4
  25. data/vendor/toolkit/twitter/bootstrap/code.less +6 -1
  26. data/vendor/toolkit/twitter/bootstrap/component-animations.less +6 -4
  27. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +2 -0
  28. data/vendor/toolkit/twitter/bootstrap/forms.less +144 -42
  29. data/vendor/toolkit/twitter/bootstrap/input-groups.less +6 -2
  30. data/vendor/toolkit/twitter/bootstrap/jumbotron.less +4 -0
  31. data/vendor/toolkit/twitter/bootstrap/labels.less +1 -1
  32. data/vendor/toolkit/twitter/bootstrap/list-group.less +22 -1
  33. data/vendor/toolkit/twitter/bootstrap/mixins.less +35 -925
  34. data/vendor/toolkit/twitter/bootstrap/mixins/alerts.less +14 -0
  35. data/vendor/toolkit/twitter/bootstrap/mixins/background-variant.less +8 -0
  36. data/vendor/toolkit/twitter/bootstrap/mixins/border-radius.less +18 -0
  37. data/vendor/toolkit/twitter/bootstrap/mixins/buttons.less +50 -0
  38. data/vendor/toolkit/twitter/bootstrap/mixins/center-block.less +7 -0
  39. data/vendor/toolkit/twitter/bootstrap/mixins/clearfix.less +22 -0
  40. data/vendor/toolkit/twitter/bootstrap/mixins/forms.less +81 -0
  41. data/vendor/toolkit/twitter/bootstrap/mixins/gradients.less +59 -0
  42. data/vendor/toolkit/twitter/bootstrap/mixins/grid-framework.less +91 -0
  43. data/vendor/toolkit/twitter/bootstrap/mixins/grid.less +122 -0
  44. data/vendor/toolkit/twitter/bootstrap/mixins/hide-text.less +21 -0
  45. data/vendor/toolkit/twitter/bootstrap/mixins/image.less +34 -0
  46. data/vendor/toolkit/twitter/bootstrap/mixins/labels.less +12 -0
  47. data/vendor/toolkit/twitter/bootstrap/mixins/list-group.less +29 -0
  48. data/vendor/toolkit/twitter/bootstrap/mixins/nav-divider.less +10 -0
  49. data/vendor/toolkit/twitter/bootstrap/mixins/nav-vertical-align.less +9 -0
  50. data/vendor/toolkit/twitter/bootstrap/mixins/opacity.less +8 -0
  51. data/vendor/toolkit/twitter/bootstrap/mixins/pagination.less +23 -0
  52. data/vendor/toolkit/twitter/bootstrap/mixins/panels.less +24 -0
  53. data/vendor/toolkit/twitter/bootstrap/mixins/progress-bar.less +10 -0
  54. data/vendor/toolkit/twitter/bootstrap/mixins/reset-filter.less +8 -0
  55. data/vendor/toolkit/twitter/bootstrap/mixins/resize.less +6 -0
  56. data/vendor/toolkit/twitter/bootstrap/mixins/responsive-visibility.less +15 -0
  57. data/vendor/toolkit/twitter/bootstrap/mixins/size.less +10 -0
  58. data/vendor/toolkit/twitter/bootstrap/mixins/tab-focus.less +9 -0
  59. data/vendor/toolkit/twitter/bootstrap/mixins/table-row.less +28 -0
  60. data/vendor/toolkit/twitter/bootstrap/mixins/text-emphasis.less +8 -0
  61. data/vendor/toolkit/twitter/bootstrap/mixins/text-overflow.less +8 -0
  62. data/vendor/toolkit/twitter/bootstrap/mixins/vendor-prefixes.less +224 -0
  63. data/vendor/toolkit/twitter/bootstrap/modals.less +18 -7
  64. data/vendor/toolkit/twitter/bootstrap/navbar.less +41 -2
  65. data/vendor/toolkit/twitter/bootstrap/navs.less +1 -1
  66. data/vendor/toolkit/twitter/bootstrap/normalize.less +21 -19
  67. data/vendor/toolkit/twitter/bootstrap/panels.less +8 -6
  68. data/vendor/toolkit/twitter/bootstrap/popovers.less +1 -1
  69. data/vendor/toolkit/twitter/bootstrap/progress-bars.less +27 -2
  70. data/vendor/toolkit/twitter/bootstrap/responsive-embed.less +34 -0
  71. data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +103 -1
  72. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +17 -1
  73. data/vendor/toolkit/twitter/bootstrap/tables.less +4 -4
  74. data/vendor/toolkit/twitter/bootstrap/theme.less +11 -0
  75. data/vendor/toolkit/twitter/bootstrap/type.less +32 -12
  76. data/vendor/toolkit/twitter/bootstrap/utilities.less +1 -0
  77. data/vendor/toolkit/twitter/bootstrap/variables.less +40 -23
  78. metadata +35 -5
@@ -2,9 +2,10 @@
2
2
  @import "variables.less";
3
3
  @import "mixins.less";
4
4
 
5
- // Reset
5
+ // Reset and dependencies
6
6
  @import "normalize.less";
7
7
  @import "print.less";
8
+ @import "glyphicons.less";
8
9
 
9
10
  // Core CSS
10
11
  @import "scaffolding.less";
@@ -17,7 +18,6 @@
17
18
 
18
19
  // Components
19
20
  @import "component-animations.less";
20
- @import "glyphicons.less";
21
21
  @import "dropdowns.less";
22
22
  @import "button-groups.less";
23
23
  @import "input-groups.less";
@@ -35,6 +35,7 @@
35
35
  @import "media.less";
36
36
  @import "list-group.less";
37
37
  @import "panels.less";
38
+ @import "responsive-embed.less";
38
39
  @import "wells.less";
39
40
  @import "close.less";
40
41
 
@@ -1,932 +1,42 @@
1
1
  // <%= config[:theme_info] %>
2
2
  // Bootswatch
3
3
 
4
- //
5
4
  // Mixins
6
5
  // --------------------------------------------------
7
6
 
8
-
9
7
  // Utilities
10
- // -------------------------
11
-
12
- // Clearfix
13
- // Source: http://nicolasgallagher.com/micro-clearfix-hack/
14
- //
15
- // For modern browsers
16
- // 1. The space content is one way to avoid an Opera bug when the
17
- // contenteditable attribute is included anywhere else in the document.
18
- // Otherwise it causes space to appear at the top and bottom of elements
19
- // that are clearfixed.
20
- // 2. The use of `table` rather than `block` is only necessary if using
21
- // `:before` to contain the top-margins of child elements.
22
- .clearfix() {
23
- &:before,
24
- &:after {
25
- content: " "; // 1
26
- display: table; // 2
27
- }
28
- &:after {
29
- clear: both;
30
- }
31
- }
32
-
33
- // WebKit-style focus
34
- .tab-focus() {
35
- // Default
36
- outline: thin dotted;
37
- // WebKit
38
- outline: 5px auto -webkit-focus-ring-color;
39
- outline-offset: -2px;
40
- }
41
-
42
- // Center-align a block level element
43
- .center-block() {
44
- display: block;
45
- margin-left: auto;
46
- margin-right: auto;
47
- }
48
-
49
- // Sizing shortcuts
50
- .size(@width; @height) {
51
- width: @width;
52
- height: @height;
53
- }
54
- .square(@size) {
55
- .size(@size; @size);
56
- }
57
-
58
- // Placeholder text
59
- .placeholder(@color: @input-color-placeholder) {
60
- &::-moz-placeholder { color: @color; // Firefox
61
- opacity: 1; } // See https://github.com/twbs/bootstrap/pull/11526
62
- &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+
63
- &::-webkit-input-placeholder { color: @color; } // Safari and Chrome
64
- }
65
-
66
- // Text overflow
67
- // Requires inline-block or block for proper styling
68
- .text-overflow() {
69
- overflow: hidden;
70
- text-overflow: ellipsis;
71
- white-space: nowrap;
72
- }
73
-
74
- // CSS image replacement
75
- //
76
- // Heads up! v3 launched with with only `.hide-text()`, but per our pattern for
77
- // mixins being reused as classes with the same name, this doesn't hold up. As
78
- // of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. Note
79
- // that we cannot chain the mixins together in Less, so they are repeated.
80
- //
81
- // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
82
-
83
- // Deprecated as of v3.0.1 (will be removed in v4)
84
- .hide-text() {
85
- font: ~"0/0" a;
86
- color: transparent;
87
- text-shadow: none;
88
- background-color: transparent;
89
- border: 0;
90
- }
91
- // New mixin to use as of v3.0.1
92
- .text-hide() {
93
- .hide-text();
94
- }
95
-
96
-
97
-
98
- // CSS3 PROPERTIES
99
- // --------------------------------------------------
100
-
101
- // Single side border-radius
102
- .border-top-radius(@radius) {
103
- border-top-right-radius: @radius;
104
- border-top-left-radius: @radius;
105
- }
106
- .border-right-radius(@radius) {
107
- border-bottom-right-radius: @radius;
108
- border-top-right-radius: @radius;
109
- }
110
- .border-bottom-radius(@radius) {
111
- border-bottom-right-radius: @radius;
112
- border-bottom-left-radius: @radius;
113
- }
114
- .border-left-radius(@radius) {
115
- border-bottom-left-radius: @radius;
116
- border-top-left-radius: @radius;
117
- }
118
-
119
- // Drop shadows
120
- //
121
- // Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's
122
- // supported browsers that have box shadow capabilities now support the
123
- // standard `box-shadow` property.
124
- .box-shadow(@shadow) {
125
- -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1
126
- box-shadow: @shadow;
127
- }
128
-
129
- // Transitions
130
- .transition(@transition) {
131
- -webkit-transition: @transition;
132
- transition: @transition;
133
- }
134
- .transition-property(@transition-property) {
135
- -webkit-transition-property: @transition-property;
136
- transition-property: @transition-property;
137
- }
138
- .transition-delay(@transition-delay) {
139
- -webkit-transition-delay: @transition-delay;
140
- transition-delay: @transition-delay;
141
- }
142
- .transition-duration(@transition-duration) {
143
- -webkit-transition-duration: @transition-duration;
144
- transition-duration: @transition-duration;
145
- }
146
- .transition-transform(@transition) {
147
- -webkit-transition: -webkit-transform @transition;
148
- -moz-transition: -moz-transform @transition;
149
- -o-transition: -o-transform @transition;
150
- transition: transform @transition;
151
- }
152
-
153
- // Transformations
154
- .rotate(@degrees) {
155
- -webkit-transform: rotate(@degrees);
156
- -ms-transform: rotate(@degrees); // IE9 only
157
- transform: rotate(@degrees);
158
- }
159
- .scale(@ratio; @ratio-y...) {
160
- -webkit-transform: scale(@ratio, @ratio-y);
161
- -ms-transform: scale(@ratio, @ratio-y); // IE9 only
162
- transform: scale(@ratio, @ratio-y);
163
- }
164
- .translate(@x; @y) {
165
- -webkit-transform: translate(@x, @y);
166
- -ms-transform: translate(@x, @y); // IE9 only
167
- transform: translate(@x, @y);
168
- }
169
- .skew(@x; @y) {
170
- -webkit-transform: skew(@x, @y);
171
- -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+
172
- transform: skew(@x, @y);
173
- }
174
- .translate3d(@x; @y; @z) {
175
- -webkit-transform: translate3d(@x, @y, @z);
176
- transform: translate3d(@x, @y, @z);
177
- }
178
-
179
- .rotateX(@degrees) {
180
- -webkit-transform: rotateX(@degrees);
181
- -ms-transform: rotateX(@degrees); // IE9 only
182
- transform: rotateX(@degrees);
183
- }
184
- .rotateY(@degrees) {
185
- -webkit-transform: rotateY(@degrees);
186
- -ms-transform: rotateY(@degrees); // IE9 only
187
- transform: rotateY(@degrees);
188
- }
189
- .perspective(@perspective) {
190
- -webkit-perspective: @perspective;
191
- -moz-perspective: @perspective;
192
- perspective: @perspective;
193
- }
194
- .perspective-origin(@perspective) {
195
- -webkit-perspective-origin: @perspective;
196
- -moz-perspective-origin: @perspective;
197
- perspective-origin: @perspective;
198
- }
199
- .transform-origin(@origin) {
200
- -webkit-transform-origin: @origin;
201
- -moz-transform-origin: @origin;
202
- -ms-transform-origin: @origin; // IE9 only
203
- transform-origin: @origin;
204
- }
205
-
206
- // Animations
207
- .animation(@animation) {
208
- -webkit-animation: @animation;
209
- animation: @animation;
210
- }
211
- .animation-name(@name) {
212
- -webkit-animation-name: @name;
213
- animation-name: @name;
214
- }
215
- .animation-duration(@duration) {
216
- -webkit-animation-duration: @duration;
217
- animation-duration: @duration;
218
- }
219
- .animation-timing-function(@timing-function) {
220
- -webkit-animation-timing-function: @timing-function;
221
- animation-timing-function: @timing-function;
222
- }
223
- .animation-delay(@delay) {
224
- -webkit-animation-delay: @delay;
225
- animation-delay: @delay;
226
- }
227
- .animation-iteration-count(@iteration-count) {
228
- -webkit-animation-iteration-count: @iteration-count;
229
- animation-iteration-count: @iteration-count;
230
- }
231
- .animation-direction(@direction) {
232
- -webkit-animation-direction: @direction;
233
- animation-direction: @direction;
234
- }
235
-
236
- // Backface visibility
237
- // Prevent browsers from flickering when using CSS 3D transforms.
238
- // Default value is `visible`, but can be changed to `hidden`
239
- .backface-visibility(@visibility){
240
- -webkit-backface-visibility: @visibility;
241
- -moz-backface-visibility: @visibility;
242
- backface-visibility: @visibility;
243
- }
244
-
245
- // Box sizing
246
- .box-sizing(@boxmodel) {
247
- -webkit-box-sizing: @boxmodel;
248
- -moz-box-sizing: @boxmodel;
249
- box-sizing: @boxmodel;
250
- }
251
-
252
- // User select
253
- // For selecting text on the page
254
- .user-select(@select) {
255
- -webkit-user-select: @select;
256
- -moz-user-select: @select;
257
- -ms-user-select: @select; // IE10+
258
- user-select: @select;
259
- }
260
-
261
- // Resize anything
262
- .resizable(@direction) {
263
- resize: @direction; // Options: horizontal, vertical, both
264
- overflow: auto; // Safari fix
265
- }
266
-
267
- // CSS3 Content Columns
268
- .content-columns(@column-count; @column-gap: @grid-gutter-width) {
269
- -webkit-column-count: @column-count;
270
- -moz-column-count: @column-count;
271
- column-count: @column-count;
272
- -webkit-column-gap: @column-gap;
273
- -moz-column-gap: @column-gap;
274
- column-gap: @column-gap;
275
- }
276
-
277
- // Optional hyphenation
278
- .hyphens(@mode: auto) {
279
- word-wrap: break-word;
280
- -webkit-hyphens: @mode;
281
- -moz-hyphens: @mode;
282
- -ms-hyphens: @mode; // IE10+
283
- -o-hyphens: @mode;
284
- hyphens: @mode;
285
- }
286
-
287
- // Opacity
288
- .opacity(@opacity) {
289
- opacity: @opacity;
290
- // IE8 filter
291
- @opacity-ie: (@opacity * 100);
292
- filter: ~"alpha(opacity=@{opacity-ie})";
293
- }
294
-
295
-
296
-
297
- // GRADIENTS
298
- // --------------------------------------------------
299
-
300
- #gradient {
301
-
302
- // Horizontal gradient, from left to right
303
- //
304
- // Creates two color stops, start and end, by specifying a color and position for each color stop.
305
- // Color stops are not available in IE9 and below.
306
- .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
307
- background-image: -webkit-linear-gradient(left, color-stop(@start-color @start-percent), color-stop(@end-color @end-percent)); // Safari 5.1-6, Chrome 10+
308
- background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
309
- background-repeat: repeat-x;
310
- filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down
311
- }
312
-
313
- // Vertical gradient, from top to bottom
314
- //
315
- // Creates two color stops, start and end, by specifying a color and position for each color stop.
316
- // Color stops are not available in IE9 and below.
317
- .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
318
- background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+
319
- background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
320
- background-repeat: repeat-x;
321
- filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down
322
- }
323
-
324
- .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {
325
- background-repeat: repeat-x;
326
- background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+
327
- background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
328
- }
329
- .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {
330
- background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);
331
- background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);
332
- background-repeat: no-repeat;
333
- filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
334
- }
335
- .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {
336
- background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);
337
- background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);
338
- background-repeat: no-repeat;
339
- filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
340
- }
341
- .radial(@inner-color: #555; @outer-color: #333) {
342
- background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);
343
- background-image: radial-gradient(circle, @inner-color, @outer-color);
344
- background-repeat: no-repeat;
345
- }
346
- .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {
347
- background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
348
- background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
349
- }
350
- }
351
-
352
- // Reset filters for IE
353
- //
354
- // When you need to remove a gradient background, do not forget to use this to reset
355
- // the IE filter for IE9 and below.
356
- .reset-filter() {
357
- filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"));
358
- }
359
-
360
-
361
-
362
- // Retina images
363
- //
364
- // Short retina mixin for setting background-image and -size
365
-
366
- .img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {
367
- background-image: asset-url("@{file-1x}");
368
-
369
- @media
370
- only screen and (-webkit-min-device-pixel-ratio: 2),
371
- only screen and ( min--moz-device-pixel-ratio: 2),
372
- only screen and ( -o-min-device-pixel-ratio: 2/1),
373
- only screen and ( min-device-pixel-ratio: 2),
374
- only screen and ( min-resolution: 192dpi),
375
- only screen and ( min-resolution: 2dppx) {
376
- background-image: asset-url("@{file-2x}");
377
- background-size: @width-1x @height-1x;
378
- }
379
- }
380
-
381
-
382
- // Responsive image
383
- //
384
- // Keep images from scaling beyond the width of their parents.
385
-
386
- .img-responsive(@display: block) {
387
- display: @display;
388
- max-width: 100%; // Part 1: Set a maximum relative to the parent
389
- height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
390
- }
391
-
392
-
393
- // COMPONENT MIXINS
394
- // --------------------------------------------------
395
-
396
- // Horizontal dividers
397
- // -------------------------
398
- // Dividers (basically an hr) within dropdowns and nav lists
399
- .nav-divider(@color: #e5e5e5) {
400
- height: 1px;
401
- margin: ((@line-height-computed / 2) - 1) 0;
402
- overflow: hidden;
403
- background-color: @color;
404
- }
405
-
406
- // Panels
407
- // -------------------------
408
- .panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {
409
- border-color: @border;
410
-
411
- & > .panel-heading {
412
- color: @heading-text-color;
413
- background-color: @heading-bg-color;
414
- border-color: @heading-border;
415
-
416
- + .panel-collapse .panel-body {
417
- border-top-color: @border;
418
- }
419
- }
420
- & > .panel-footer {
421
- + .panel-collapse .panel-body {
422
- border-bottom-color: @border;
423
- }
424
- }
425
- }
426
-
427
- // Alerts
428
- // -------------------------
429
- .alert-variant(@background; @border; @text-color) {
430
- background-color: @background;
431
- border-color: @border;
432
- color: @text-color;
433
-
434
- hr {
435
- border-top-color: darken(@border, 5%);
436
- }
437
- .alert-link {
438
- color: darken(@text-color, 10%);
439
- }
440
- }
441
-
442
- // Tables
443
- // -------------------------
444
- .table-row-variant(@state; @background) {
445
- // Exact selectors below required to override `.table-striped` and prevent
446
- // inheritance to nested tables.
447
- .table > thead > tr,
448
- .table > tbody > tr,
449
- .table > tfoot > tr {
450
- > td.@{state},
451
- > th.@{state},
452
- &.@{state} > td,
453
- &.@{state} > th {
454
- background-color: @background;
455
- }
456
- }
457
-
458
- // Hover states for `.table-hover`
459
- // Note: this is not available for cells or rows within `thead` or `tfoot`.
460
- .table-hover > tbody > tr {
461
- > td.@{state}:hover,
462
- > th.@{state}:hover,
463
- &.@{state}:hover > td,
464
- &.@{state}:hover > th {
465
- background-color: darken(@background, 5%);
466
- }
467
- }
468
- }
469
-
470
- // List Groups
471
- // -------------------------
472
- .list-group-item-variant(@state; @background; @color) {
473
- .list-group-item-@{state} {
474
- color: @color;
475
- background-color: @background;
476
-
477
- a& {
478
- color: @color;
479
-
480
- .list-group-item-heading { color: inherit; }
481
-
482
- &:hover,
483
- &:focus {
484
- color: @color;
485
- background-color: darken(@background, 5%);
486
- }
487
- &.active,
488
- &.active:hover,
489
- &.active:focus {
490
- color: #fff;
491
- background-color: @color;
492
- border-color: @color;
493
- }
494
- }
495
- }
496
- }
497
-
498
- // Button variants
499
- // -------------------------
500
- // Easily pump out default styles, as well as :hover, :focus, :active,
501
- // and disabled options for all buttons
502
- .button-variant(@color; @background; @border) {
503
- color: @color;
504
- background-color: @background;
505
- border-color: @border;
506
-
507
- &:hover,
508
- &:focus,
509
- &:active,
510
- &.active,
511
- .open .dropdown-toggle& {
512
- color: @color;
513
- background-color: darken(@background, 8%);
514
- border-color: darken(@border, 12%);
515
- }
516
- &:active,
517
- &.active,
518
- .open .dropdown-toggle& {
519
- background-image: none;
520
- }
521
- &.disabled,
522
- &[disabled],
523
- fieldset[disabled] & {
524
- &,
525
- &:hover,
526
- &:focus,
527
- &:active,
528
- &.active {
529
- background-color: @background;
530
- border-color: @border;
531
- }
532
- }
533
-
534
- .badge {
535
- color: @background;
536
- background-color: @color;
537
- }
538
- }
539
-
540
- // Button sizes
541
- // -------------------------
542
- .button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
543
- padding: @padding-vertical @padding-horizontal;
544
- font-size: @font-size;
545
- line-height: @line-height;
546
- border-radius: @border-radius;
547
- }
548
-
549
- // Pagination
550
- // -------------------------
551
- .pagination-size(@padding-vertical; @padding-horizontal; @font-size; @border-radius) {
552
- > li {
553
- > a,
554
- > span {
555
- padding: @padding-vertical @padding-horizontal;
556
- font-size: @font-size;
557
- }
558
- &:first-child {
559
- > a,
560
- > span {
561
- .border-left-radius(@border-radius);
562
- }
563
- }
564
- &:last-child {
565
- > a,
566
- > span {
567
- .border-right-radius(@border-radius);
568
- }
569
- }
570
- }
571
- }
572
-
573
- // Labels
574
- // -------------------------
575
- .label-variant(@color) {
576
- background-color: @color;
577
- &[href] {
578
- &:hover,
579
- &:focus {
580
- background-color: darken(@color, 10%);
581
- }
582
- }
583
- }
584
-
585
- // Contextual backgrounds
586
- // -------------------------
587
- .bg-variant(@color) {
588
- background-color: @color;
589
- a&:hover {
590
- background-color: darken(@color, 10%);
591
- }
592
- }
593
-
594
- // Typography
595
- // -------------------------
596
- .text-emphasis-variant(@color) {
597
- color: @color;
598
- a&:hover {
599
- color: darken(@color, 10%);
600
- }
601
- }
602
-
603
- // Navbar vertical align
604
- // -------------------------
605
- // Vertically center elements in the navbar.
606
- // Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.
607
- .navbar-vertical-align(@element-height) {
608
- margin-top: ((@navbar-height - @element-height) / 2);
609
- margin-bottom: ((@navbar-height - @element-height) / 2);
610
- }
611
-
612
- // Progress bars
613
- // -------------------------
614
- .progress-bar-variant(@color) {
615
- background-color: @color;
616
- .progress-striped & {
617
- #gradient > .striped();
618
- }
619
- }
620
-
621
- // Responsive utilities
622
- // -------------------------
623
- // More easily include all the states for responsive-utilities.less.
624
- .responsive-visibility() {
625
- display: block !important;
626
- table& { display: table; }
627
- tr& { display: table-row !important; }
628
- th&,
629
- td& { display: table-cell !important; }
630
- }
631
-
632
- .responsive-invisibility() {
633
- display: none !important;
634
- }
635
-
636
-
637
- // Grid System
638
- // -----------
639
-
640
- // Centered container element
641
- .container-fixed() {
642
- margin-right: auto;
643
- margin-left: auto;
644
- padding-left: (@grid-gutter-width / 2);
645
- padding-right: (@grid-gutter-width / 2);
646
- &:extend(.clearfix all);
647
- }
648
-
649
- // Creates a wrapper for a series of columns
650
- .make-row(@gutter: @grid-gutter-width) {
651
- margin-left: (@gutter / -2);
652
- margin-right: (@gutter / -2);
653
- &:extend(.clearfix all);
654
- }
655
-
656
- // Generate the extra small columns
657
- .make-xs-column(@columns; @gutter: @grid-gutter-width) {
658
- position: relative;
659
- float: left;
660
- width: percentage((@columns / @grid-columns));
661
- min-height: 1px;
662
- padding-left: (@gutter / 2);
663
- padding-right: (@gutter / 2);
664
- }
665
- .make-xs-column-offset(@columns) {
666
- @media (min-width: @screen-xs-min) {
667
- margin-left: percentage((@columns / @grid-columns));
668
- }
669
- }
670
- .make-xs-column-push(@columns) {
671
- @media (min-width: @screen-xs-min) {
672
- left: percentage((@columns / @grid-columns));
673
- }
674
- }
675
- .make-xs-column-pull(@columns) {
676
- @media (min-width: @screen-xs-min) {
677
- right: percentage((@columns / @grid-columns));
678
- }
679
- }
680
-
681
-
682
- // Generate the small columns
683
- .make-sm-column(@columns; @gutter: @grid-gutter-width) {
684
- position: relative;
685
- min-height: 1px;
686
- padding-left: (@gutter / 2);
687
- padding-right: (@gutter / 2);
688
-
689
- @media (min-width: @screen-sm-min) {
690
- float: left;
691
- width: percentage((@columns / @grid-columns));
692
- }
693
- }
694
- .make-sm-column-offset(@columns) {
695
- @media (min-width: @screen-sm-min) {
696
- margin-left: percentage((@columns / @grid-columns));
697
- }
698
- }
699
- .make-sm-column-push(@columns) {
700
- @media (min-width: @screen-sm-min) {
701
- left: percentage((@columns / @grid-columns));
702
- }
703
- }
704
- .make-sm-column-pull(@columns) {
705
- @media (min-width: @screen-sm-min) {
706
- right: percentage((@columns / @grid-columns));
707
- }
708
- }
709
-
710
-
711
- // Generate the medium columns
712
- .make-md-column(@columns; @gutter: @grid-gutter-width) {
713
- position: relative;
714
- min-height: 1px;
715
- padding-left: (@gutter / 2);
716
- padding-right: (@gutter / 2);
717
-
718
- @media (min-width: @screen-md-min) {
719
- float: left;
720
- width: percentage((@columns / @grid-columns));
721
- }
722
- }
723
- .make-md-column-offset(@columns) {
724
- @media (min-width: @screen-md-min) {
725
- margin-left: percentage((@columns / @grid-columns));
726
- }
727
- }
728
- .make-md-column-push(@columns) {
729
- @media (min-width: @screen-md-min) {
730
- left: percentage((@columns / @grid-columns));
731
- }
732
- }
733
- .make-md-column-pull(@columns) {
734
- @media (min-width: @screen-md-min) {
735
- right: percentage((@columns / @grid-columns));
736
- }
737
- }
738
-
739
-
740
- // Generate the large columns
741
- .make-lg-column(@columns; @gutter: @grid-gutter-width) {
742
- position: relative;
743
- min-height: 1px;
744
- padding-left: (@gutter / 2);
745
- padding-right: (@gutter / 2);
746
-
747
- @media (min-width: @screen-lg-min) {
748
- float: left;
749
- width: percentage((@columns / @grid-columns));
750
- }
751
- }
752
- .make-lg-column-offset(@columns) {
753
- @media (min-width: @screen-lg-min) {
754
- margin-left: percentage((@columns / @grid-columns));
755
- }
756
- }
757
- .make-lg-column-push(@columns) {
758
- @media (min-width: @screen-lg-min) {
759
- left: percentage((@columns / @grid-columns));
760
- }
761
- }
762
- .make-lg-column-pull(@columns) {
763
- @media (min-width: @screen-lg-min) {
764
- right: percentage((@columns / @grid-columns));
765
- }
766
- }
767
-
768
-
769
- // Framework grid generation
770
- //
771
- // Used only by Bootstrap to generate the correct number of grid classes given
772
- // any value of `@grid-columns`.
773
-
774
- .make-grid-columns() {
775
- // Common styles for all sizes of grid columns, widths 1-12
776
- .col(@index) when (@index = 1) { // initial
777
- @item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}";
778
- .col((@index + 1), @item);
779
- }
780
- .col(@index, @list) when (@index =< @grid-columns) { // general; "=<" isn't a typo
781
- @item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}";
782
- .col((@index + 1), ~"@{list}, @{item}");
783
- }
784
- .col(@index, @list) when (@index > @grid-columns) { // terminal
785
- @{list} {
786
- position: relative;
787
- // Prevent columns from collapsing when empty
788
- min-height: 1px;
789
- // Inner gutter via padding
790
- padding-left: (@grid-gutter-width / 2);
791
- padding-right: (@grid-gutter-width / 2);
792
- }
793
- }
794
- .col(1); // kickstart it
795
- }
796
-
797
- .float-grid-columns(@class) {
798
- .col(@index) when (@index = 1) { // initial
799
- @item: ~".col-@{class}-@{index}";
800
- .col((@index + 1), @item);
801
- }
802
- .col(@index, @list) when (@index =< @grid-columns) { // general
803
- @item: ~".col-@{class}-@{index}";
804
- .col((@index + 1), ~"@{list}, @{item}");
805
- }
806
- .col(@index, @list) when (@index > @grid-columns) { // terminal
807
- @{list} {
808
- float: left;
809
- }
810
- }
811
- .col(1); // kickstart it
812
- }
813
-
814
- .calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {
815
- .col-@{class}-@{index} {
816
- width: percentage((@index / @grid-columns));
817
- }
818
- }
819
- .calc-grid-column(@index, @class, @type) when (@type = push) {
820
- .col-@{class}-push-@{index} {
821
- left: percentage((@index / @grid-columns));
822
- }
823
- }
824
- .calc-grid-column(@index, @class, @type) when (@type = pull) {
825
- .col-@{class}-pull-@{index} {
826
- right: percentage((@index / @grid-columns));
827
- }
828
- }
829
- .calc-grid-column(@index, @class, @type) when (@type = offset) {
830
- .col-@{class}-offset-@{index} {
831
- margin-left: percentage((@index / @grid-columns));
832
- }
833
- }
834
-
835
- // Basic looping in LESS
836
- .loop-grid-columns(@index, @class, @type) when (@index >= 0) {
837
- .calc-grid-column(@index, @class, @type);
838
- // next iteration
839
- .loop-grid-columns((@index - 1), @class, @type);
840
- }
841
-
842
- // Create grid for specific class
843
- .make-grid(@class) {
844
- .float-grid-columns(@class);
845
- .loop-grid-columns(@grid-columns, @class, width);
846
- .loop-grid-columns(@grid-columns, @class, pull);
847
- .loop-grid-columns(@grid-columns, @class, push);
848
- .loop-grid-columns(@grid-columns, @class, offset);
849
- }
850
-
851
- // Form validation states
852
- //
853
- // Used in forms.less to generate the form validation CSS for warnings, errors,
854
- // and successes.
855
-
856
- .form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) {
857
- // Color the label and help text
858
- .help-block,
859
- .control-label,
860
- .radio,
861
- .checkbox,
862
- .radio-inline,
863
- .checkbox-inline {
864
- color: @text-color;
865
- }
866
- // Set the border and box shadow on specific inputs to match
867
- .form-control {
868
- border-color: @border-color;
869
- .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
870
- &:focus {
871
- border-color: darken(@border-color, 10%);
872
- @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%);
873
- .box-shadow(@shadow);
874
- }
875
- }
876
- // Set validation states also for addons
877
- .input-group-addon {
878
- color: @text-color;
879
- border-color: @border-color;
880
- background-color: @background-color;
881
- }
882
- // Optional feedback icon
883
- .form-control-feedback {
884
- color: @text-color;
885
- }
886
- }
887
-
888
- // Form control focus state
889
- //
890
- // Generate a customized focus state and for any input with the specified color,
891
- // which defaults to the `@input-focus-border` variable.
892
- //
893
- // We highly encourage you to not customize the default value, but instead use
894
- // this to tweak colors on an as-needed basis. This aesthetic change is based on
895
- // WebKit's default styles, but applicable to a wider range of browsers. Its
896
- // usability and accessibility should be taken into account with any change.
897
- //
898
- // Example usage: change the default blue border and shadow to white for better
899
- // contrast against a dark gray background.
900
-
901
- .form-control-focus(@color: @input-border-focus) {
902
- @color-rgba: rgba(red(@color), green(@color), blue(@color), .6);
903
- &:focus {
904
- border-color: @color;
905
- outline: 0;
906
- .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}");
907
- }
908
- }
909
-
910
- // Form control sizing
911
- //
912
- // Relative text size, padding, and border-radii changes for form controls. For
913
- // horizontal sizing, wrap controls in the predefined grid classes. `<select>`
914
- // element gets special love because it's special, and that's a fact!
915
-
916
- .input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
917
- height: @input-height;
918
- padding: @padding-vertical @padding-horizontal;
919
- font-size: @font-size;
920
- line-height: @line-height;
921
- border-radius: @border-radius;
922
-
923
- select& {
924
- height: @input-height;
925
- line-height: @input-height;
926
- }
927
-
928
- textarea&,
929
- select[multiple]& {
930
- height: auto;
931
- }
932
- }
8
+ @import "twitter/bootstrap/mixins/hide-text.less";
9
+ @import "twitter/bootstrap/mixins/opacity.less";
10
+ @import "twitter/bootstrap/mixins/image.less";
11
+ @import "twitter/bootstrap/mixins/labels.less";
12
+ @import "twitter/bootstrap/mixins/reset-filter.less";
13
+ @import "twitter/bootstrap/mixins/resize.less";
14
+ @import "twitter/bootstrap/mixins/responsive-visibility.less";
15
+ @import "twitter/bootstrap/mixins/size.less";
16
+ @import "twitter/bootstrap/mixins/tab-focus.less";
17
+ @import "twitter/bootstrap/mixins/text-emphasis.less";
18
+ @import "twitter/bootstrap/mixins/text-overflow.less";
19
+ @import "twitter/bootstrap/mixins/vendor-prefixes.less";
20
+
21
+ // Components
22
+ @import "twitter/bootstrap/mixins/alerts.less";
23
+ @import "twitter/bootstrap/mixins/buttons.less";
24
+ @import "twitter/bootstrap/mixins/panels.less";
25
+ @import "twitter/bootstrap/mixins/pagination.less";
26
+ @import "twitter/bootstrap/mixins/list-group.less";
27
+ @import "twitter/bootstrap/mixins/nav-divider.less";
28
+ @import "twitter/bootstrap/mixins/forms.less";
29
+ @import "twitter/bootstrap/mixins/progress-bar.less";
30
+ @import "twitter/bootstrap/mixins/table-row.less";
31
+
32
+ // Skins
33
+ @import "twitter/bootstrap/mixins/background-variant.less";
34
+ @import "twitter/bootstrap/mixins/border-radius.less";
35
+ @import "twitter/bootstrap/mixins/gradients.less";
36
+
37
+ // Layout
38
+ @import "twitter/bootstrap/mixins/clearfix.less";
39
+ @import "twitter/bootstrap/mixins/center-block.less";
40
+ @import "twitter/bootstrap/mixins/nav-vertical-align.less";
41
+ @import "twitter/bootstrap/mixins/grid-framework.less";
42
+ @import "twitter/bootstrap/mixins/grid.less";