twitter-bootswatch-rails 3.1.1.1 → 3.2.0.0

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