bootstrap-more 0.0.1

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