twitter-bootstrap-rails 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of twitter-bootstrap-rails might be problematic. Click here for more details.

Files changed (29) hide show
  1. data/.gitignore +4 -4
  2. data/Gemfile +4 -4
  3. data/README +0 -0
  4. data/README.md +66 -0
  5. data/Rakefile +3 -3
  6. data/lib/twitter-bootstrap-rails/engine.rb +9 -0
  7. data/lib/twitter-bootstrap-rails/railtie.rb +7 -0
  8. data/lib/twitter-bootstrap-rails/version.rb +8 -8
  9. data/lib/twitter-bootstrap-rails.rb +12 -12
  10. data/twitter-bootstrap-rails.gemspec +27 -27
  11. data/vendor/assets/javascripts/bootstrap-alerts-1.3.0.js +104 -0
  12. data/vendor/assets/javascripts/bootstrap-dropdown-1.3.0.js +50 -0
  13. data/vendor/assets/javascripts/bootstrap-modal-1.3.0.js +238 -0
  14. data/vendor/assets/javascripts/bootstrap-popover-1.3.0.js +77 -0
  15. data/vendor/assets/javascripts/bootstrap-scrollspy-1.3.0.js +105 -0
  16. data/vendor/assets/javascripts/bootstrap-tabs-1.3.0.js +62 -0
  17. data/vendor/assets/javascripts/bootstrap-twipsy-1.3.0.js +307 -0
  18. data/vendor/assets/stylesheets/bootstrap/bootstrap.less +26 -0
  19. data/vendor/assets/stylesheets/bootstrap/forms.less +465 -0
  20. data/vendor/assets/stylesheets/bootstrap/mixins.less +217 -0
  21. data/vendor/assets/stylesheets/bootstrap/patterns.less +1005 -0
  22. data/vendor/assets/stylesheets/bootstrap/reset.less +141 -0
  23. data/vendor/assets/stylesheets/bootstrap/scaffolding.less +135 -0
  24. data/vendor/assets/stylesheets/bootstrap/tables.less +170 -0
  25. data/vendor/assets/stylesheets/bootstrap/type.less +187 -0
  26. data/vendor/assets/stylesheets/bootstrap/variables.less +60 -0
  27. data/vendor/assets/stylesheets/bootstrap-1.3.0.css +2362 -0
  28. data/vendor/assets/stylesheets/bootstrap-1.3.0.min.css +330 -0
  29. metadata +33 -13
@@ -0,0 +1,465 @@
1
+ /* Forms.less
2
+ * Base styles for various input types, form layouts, and states
3
+ * ------------------------------------------------------------- */
4
+
5
+
6
+ // FORM STYLES
7
+ // -----------
8
+
9
+ form {
10
+ margin-bottom: @baseline;
11
+ }
12
+
13
+ // Groups of fields with labels on top (legends)
14
+ fieldset {
15
+ margin-bottom: @baseline;
16
+ padding-top: @baseline;
17
+ legend {
18
+ display: block;
19
+ padding-left: 150px;
20
+ font-size: @basefont * 1.5;
21
+ line-height: 1;
22
+ color: @grayDark;
23
+ *padding: 0 0 5px 145px; /* IE6-7 */
24
+ *line-height: 1.5; /* IE6-7 */
25
+ }
26
+ }
27
+
28
+ // Parent element that clears floats and wraps labels and fields together
29
+ form .clearfix {
30
+ margin-bottom: @baseline;
31
+ .clearfix()
32
+ }
33
+
34
+ // Set font for forms
35
+ label,
36
+ input,
37
+ select,
38
+ textarea {
39
+ #font > .sans-serif(normal,13px,normal);
40
+ }
41
+
42
+ // Float labels left
43
+ label {
44
+ padding-top: 6px;
45
+ font-size: @basefont;
46
+ line-height: @baseline;
47
+ float: left;
48
+ width: 130px;
49
+ text-align: right;
50
+ color: @grayDark;
51
+ }
52
+
53
+ // Shift over the inside div to align all label's relevant content
54
+ form .input {
55
+ margin-left: 150px;
56
+ }
57
+
58
+ // Checkboxs and radio buttons
59
+ input[type=checkbox],
60
+ input[type=radio] {
61
+ cursor: pointer;
62
+ }
63
+
64
+ // Inputs, Textareas, Selects
65
+ input,
66
+ textarea,
67
+ select,
68
+ .uneditable-input {
69
+ display: inline-block;
70
+ width: 210px;
71
+ height: @baseline;
72
+ padding: 4px;
73
+ font-size: @basefont;
74
+ line-height: @baseline;
75
+ color: @gray;
76
+ border: 1px solid #ccc;
77
+ .border-radius(3px);
78
+ }
79
+
80
+ /* mini reset for non-html5 file types */
81
+ input[type=checkbox],
82
+ input[type=radio] {
83
+ width: auto;
84
+ height: auto;
85
+ padding: 0;
86
+ margin: 3px 0;
87
+ *margin-top: 0; /* IE6-7 */
88
+ line-height: normal;
89
+ border: none;
90
+ }
91
+
92
+ input[type=file] {
93
+ background-color: @white;
94
+ padding: initial;
95
+ border: initial;
96
+ line-height: initial;
97
+ .box-shadow(none);
98
+ }
99
+
100
+ input[type=button],
101
+ input[type=reset],
102
+ input[type=submit] {
103
+ width: auto;
104
+ height: auto;
105
+ }
106
+
107
+ select,
108
+ input[type=file] {
109
+ height: @baseline * 1.5; // In IE7, the height of the select element cannot be changed by height, only font-size
110
+ line-height: @baseline * 1.5;
111
+ *margin-top: 4px; /* For IE7, add top margin to align select with labels */
112
+ }
113
+
114
+ // Make multiple select elements height not fixed
115
+ select[multiple] {
116
+ height: inherit;
117
+ }
118
+
119
+ textarea {
120
+ height: auto;
121
+ }
122
+
123
+ // For text that needs to appear as an input but should not be an input
124
+ .uneditable-input {
125
+ background-color: @white;
126
+ display: block;
127
+ border-color: #eee;
128
+ .box-shadow(inset 0 1px 2px rgba(0,0,0,.025));
129
+ cursor: not-allowed;
130
+ }
131
+
132
+ // Placeholder text gets special styles; can't be bundled together though for some reason
133
+ :-moz-placeholder {
134
+ color: @grayLight;
135
+ }
136
+ ::-webkit-input-placeholder {
137
+ color: @grayLight;
138
+ }
139
+
140
+ // Focus states
141
+ input,
142
+ textarea {
143
+ @transition: border linear .2s, box-shadow linear .2s;
144
+ .transition(@transition);
145
+ .box-shadow(inset 0 1px 3px rgba(0,0,0,.1));
146
+ }
147
+ input:focus,
148
+ textarea:focus {
149
+ outline: 0;
150
+ border-color: rgba(82,168,236,.8);
151
+ @shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6);
152
+ .box-shadow(@shadow);
153
+ }
154
+ input[type=file]:focus,
155
+ input[type=checkbox]:focus,
156
+ select:focus {
157
+ .box-shadow(none); // override for file inputs
158
+ outline: 1px dotted #666; // Selet elements don't get box-shadow styles, so instead we do outline
159
+ }
160
+
161
+ // Error styles
162
+ form div.clearfix.error {
163
+ background: lighten(@red, 57%);
164
+ padding: 10px 0;
165
+ margin: -10px 0 10px;
166
+ .border-radius(4px);
167
+ @error-text: desaturate(lighten(@red, 25%), 25%);
168
+ > label,
169
+ span.help-inline,
170
+ span.help-block {
171
+ color: @red;
172
+ }
173
+ input,
174
+ textarea {
175
+ border-color: @error-text;
176
+ .box-shadow(0 0 3px rgba(171,41,32,.25));
177
+ &:focus {
178
+ border-color: darken(@error-text, 10%);
179
+ .box-shadow(0 0 6px rgba(171,41,32,.5));
180
+ }
181
+ }
182
+ .input-prepend,
183
+ .input-append {
184
+ span.add-on {
185
+ background: lighten(@red, 50%);
186
+ border-color: @error-text;
187
+ color: darken(@error-text, 10%);
188
+ }
189
+ }
190
+ }
191
+
192
+ // Form element sizes
193
+ // TODO v2: remove duplication here and just stick to .input-[size] in light of adding .spanN sizes
194
+ .input-mini,
195
+ input.mini,
196
+ textarea.mini,
197
+ select.mini {
198
+ width: 60px;
199
+ }
200
+ .input-small,
201
+ input.small,
202
+ textarea.small,
203
+ select.small {
204
+ width: 90px;
205
+ }
206
+ .input-medium,
207
+ input.medium,
208
+ textarea.medium,
209
+ select.medium {
210
+ width: 150px;
211
+ }
212
+ .input-large,
213
+ input.large,
214
+ textarea.large,
215
+ select.large {
216
+ width: 210px;
217
+ }
218
+ .input-xlarge,
219
+ input.xlarge,
220
+ textarea.xlarge,
221
+ select.xlarge {
222
+ width: 270px;
223
+ }
224
+ .input-xxlarge,
225
+ input.xxlarge,
226
+ textarea.xxlarge,
227
+ select.xxlarge {
228
+ width: 530px;
229
+ }
230
+ textarea.xxlarge {
231
+ overflow-y: auto;
232
+ }
233
+
234
+ // Grid style input sizes
235
+ // This is a duplication of the main grid .columns() mixin, but subtracts 10px to account for input padding and border
236
+ .formColumns(@columnSpan: 1) {
237
+ display: inline-block;
238
+ float: none;
239
+ width: ((@gridColumnWidth - 10) * @columnSpan) + ((@gridColumnWidth - 10) * (@columnSpan - 1));
240
+ margin-left: 0;
241
+ }
242
+ input,
243
+ textarea,
244
+ select {
245
+ // Default columns
246
+ &.span1 { .formColumns(1); }
247
+ &.span2 { .formColumns(2); }
248
+ &.span3 { .formColumns(3); }
249
+ &.span4 { .formColumns(4); }
250
+ &.span5 { .formColumns(5); }
251
+ &.span6 { .formColumns(6); }
252
+ &.span7 { .formColumns(7); }
253
+ &.span8 { .formColumns(8); }
254
+ &.span9 { .formColumns(9); }
255
+ &.span10 { .formColumns(10); }
256
+ &.span11 { .formColumns(11); }
257
+ &.span12 { .formColumns(12); }
258
+ &.span13 { .formColumns(13); }
259
+ &.span14 { .formColumns(14); }
260
+ &.span15 { .formColumns(15); }
261
+ &.span16 { .formColumns(16); }
262
+ }
263
+
264
+ // Disabled and read-only inputs
265
+ input[disabled],
266
+ select[disabled],
267
+ textarea[disabled],
268
+ input[readonly],
269
+ select[readonly],
270
+ textarea[readonly] {
271
+ background-color: #f5f5f5;
272
+ border-color: #ddd;
273
+ cursor: not-allowed;
274
+ }
275
+
276
+ // Actions (the buttons)
277
+ .actions {
278
+ background: #f5f5f5;
279
+ margin-top: @baseline;
280
+ margin-bottom: @baseline;
281
+ padding: (@baseline - 1) 20px @baseline 150px;
282
+ border-top: 1px solid #ddd;
283
+ .border-radius(0 0 3px 3px);
284
+ .secondary-action {
285
+ float: right;
286
+ a {
287
+ line-height: 30px;
288
+ &:hover {
289
+ text-decoration: underline;
290
+ }
291
+ }
292
+ }
293
+ }
294
+
295
+ // Help Text
296
+ .help-inline,
297
+ .help-block {
298
+ font-size: @basefont - 2;
299
+ line-height: @baseline;
300
+ color: @grayLight;
301
+ }
302
+ .help-inline {
303
+ padding-left: 5px;
304
+ *position: relative; /* IE6-7 */
305
+ *top: -5px; /* IE6-7 */
306
+ }
307
+
308
+ // Big blocks of help text
309
+ .help-block {
310
+ display: block;
311
+ max-width: 600px;
312
+ }
313
+
314
+ // Inline Fields (input fields that appear as inline objects
315
+ .inline-inputs {
316
+ color: @gray;
317
+ span, input {
318
+ display: inline-block;
319
+ }
320
+ input.mini {
321
+ width: 60px;
322
+ }
323
+ input.small {
324
+ width: 90px;
325
+ }
326
+ span {
327
+ padding: 0 2px 0 1px;
328
+ }
329
+ }
330
+
331
+ // Allow us to put symbols and text within the input field for a cleaner look
332
+ .input-prepend,
333
+ .input-append {
334
+ input {
335
+ .border-radius(0 3px 3px 0);
336
+ }
337
+ .add-on {
338
+ position: relative;
339
+ background: #f5f5f5;
340
+ border: 1px solid #ccc;
341
+ z-index: 2;
342
+ float: left;
343
+ display: block;
344
+ width: auto;
345
+ min-width: 16px;
346
+ height: 18px;
347
+ padding: 4px 4px 4px 5px;
348
+ margin-right: -1px;
349
+ font-weight: normal;
350
+ line-height: 18px;
351
+ color: @grayLight;
352
+ text-align: center;
353
+ text-shadow: 0 1px 0 @white;
354
+ .border-radius(3px 0 0 3px);
355
+ }
356
+ .active {
357
+ background: lighten(@green, 30);
358
+ border-color: @green;
359
+ }
360
+ }
361
+ .input-prepend {
362
+ .add-on {
363
+ *margin-top: 1px; /* IE6-7 */
364
+ }
365
+ }
366
+ .input-append {
367
+ input {
368
+ float: left;
369
+ .border-radius(3px 0 0 3px);
370
+ }
371
+ .add-on {
372
+ .border-radius(0 3px 3px 0);
373
+ margin-right: 0;
374
+ margin-left: -1px;
375
+ }
376
+ }
377
+
378
+ // Stacked options for forms (radio buttons or checkboxes)
379
+ .inputs-list {
380
+ margin: 0 0 5px;
381
+ width: 100%;
382
+ li {
383
+ display: block;
384
+ padding: 0;
385
+ width: 100%;
386
+ }
387
+ label {
388
+ display: block;
389
+ float: none;
390
+ width: auto;
391
+ padding: 0;
392
+ line-height: @baseline;
393
+ text-align: left;
394
+ white-space: normal;
395
+ strong {
396
+ color: @gray;
397
+ }
398
+ small {
399
+ font-size: @basefont - 2;
400
+ font-weight: normal;
401
+ }
402
+ }
403
+ .inputs-list {
404
+ margin-left: 25px;
405
+ margin-bottom: 10px;
406
+ padding-top: 0;
407
+ }
408
+ &:first-child {
409
+ padding-top: 6px;
410
+ }
411
+ li + li {
412
+ padding-top: 2px;
413
+ }
414
+ input[type=radio],
415
+ input[type=checkbox] {
416
+ margin-bottom: 0;
417
+ }
418
+ }
419
+
420
+ // Stacked forms
421
+ .form-stacked {
422
+ padding-left: 20px;
423
+ fieldset {
424
+ padding-top: @baseline / 2;
425
+ }
426
+ legend {
427
+ padding-left: 0;
428
+ }
429
+ label {
430
+ display: block;
431
+ float: none;
432
+ width: auto;
433
+ font-weight: bold;
434
+ text-align: left;
435
+ line-height: 20px;
436
+ padding-top: 0;
437
+ }
438
+ .clearfix {
439
+ margin-bottom: @baseline / 2;
440
+ div.input {
441
+ margin-left: 0;
442
+ }
443
+ }
444
+ .inputs-list {
445
+ margin-bottom: 0;
446
+ li {
447
+ padding-top: 0;
448
+ label {
449
+ font-weight: normal;
450
+ padding-top: 0;
451
+ }
452
+ }
453
+ }
454
+ div.clearfix.error {
455
+ padding-top: 10px;
456
+ padding-bottom: 10px;
457
+ padding-left: 10px;
458
+ margin-top: 0;
459
+ margin-left: -10px;
460
+ }
461
+ .actions {
462
+ margin-left: -20px;
463
+ padding-left: 20px;
464
+ }
465
+ }
@@ -0,0 +1,217 @@
1
+ /* Variables.less
2
+ * Snippets of reusable CSS to develop faster and keep code readable
3
+ * ----------------------------------------------------------------- */
4
+
5
+
6
+ // Clearfix for clearing floats like a boss h5bp.com/q
7
+ .clearfix() {
8
+ zoom: 1;
9
+ &:before,
10
+ &:after {
11
+ display: table;
12
+ content: "";
13
+ zoom: 1;
14
+ *display: inline;
15
+ }
16
+ &:after {
17
+ clear: both;
18
+ }
19
+ }
20
+
21
+ // Center-align a block level element
22
+ .center-block() {
23
+ display: block;
24
+ margin-left: auto;
25
+ margin-right: auto;
26
+ }
27
+
28
+ // Sizing shortcuts
29
+ .size(@height: 5px, @width: 5px) {
30
+ height: @height;
31
+ width: @width;
32
+ }
33
+ .square(@size: 5px) {
34
+ .size(@size, @size);
35
+ }
36
+
37
+ // Input placeholder text
38
+ .placeholder(@color: @grayLight) {
39
+ :-moz-placeholder {
40
+ color: @color;
41
+ }
42
+ ::-webkit-input-placeholder {
43
+ color: @color;
44
+ }
45
+ }
46
+
47
+ // Font Stacks
48
+ #font {
49
+ .shorthand(@weight: normal, @size: 14px, @lineHeight: 20px) {
50
+ font-size: @size;
51
+ font-weight: @weight;
52
+ line-height: @lineHeight;
53
+ }
54
+ .sans-serif(@weight: normal, @size: 14px, @lineHeight: 20px) {
55
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
56
+ font-size: @size;
57
+ font-weight: @weight;
58
+ line-height: @lineHeight;
59
+ }
60
+ .serif(@weight: normal, @size: 14px, @lineHeight: 20px) {
61
+ font-family: "Georgia", Times New Roman, Times, serif;
62
+ font-size: @size;
63
+ font-weight: @weight;
64
+ line-height: @lineHeight;
65
+ }
66
+ .monospace(@weight: normal, @size: 12px, @lineHeight: 20px) {
67
+ font-family: "Monaco", Courier New, monospace;
68
+ font-size: @size;
69
+ font-weight: @weight;
70
+ line-height: @lineHeight;
71
+ }
72
+ }
73
+
74
+ // Grid System
75
+ .fixed-container() {
76
+ width: @siteWidth;
77
+ margin-left: auto;
78
+ margin-right: auto;
79
+ .clearfix();
80
+ }
81
+ .columns(@columnSpan: 1) {
82
+ width: (@gridColumnWidth * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1));
83
+ }
84
+ .offset(@columnOffset: 1) {
85
+ margin-left: (@gridColumnWidth * @columnOffset) + (@gridGutterWidth * (@columnOffset - 1)) + @extraSpace;
86
+ }
87
+ // Necessary grid styles for every column to make them appear next to each other horizontally
88
+ .gridColumn() {
89
+ display: inline;
90
+ float: left;
91
+ margin-left: @gridGutterWidth;
92
+ }
93
+ // makeColumn can be used to mark any element (e.g., .content-primary) as a column without changing markup to .span something
94
+ .makeColumn(@columnSpan: 1) {
95
+ .gridColumn();
96
+ .columns(@columnSpan);
97
+ }
98
+
99
+ // Border Radius
100
+ .border-radius(@radius: 5px) {
101
+ -webkit-border-radius: @radius;
102
+ -moz-border-radius: @radius;
103
+ border-radius: @radius;
104
+ }
105
+
106
+ // Drop shadows
107
+ .box-shadow(@shadow: 0 1px 3px rgba(0,0,0,.25)) {
108
+ -webkit-box-shadow: @shadow;
109
+ -moz-box-shadow: @shadow;
110
+ box-shadow: @shadow;
111
+ }
112
+
113
+ // Transitions
114
+ .transition(@transition) {
115
+ -webkit-transition: @transition;
116
+ -moz-transition: @transition;
117
+ -ms-transition: @transition;
118
+ -o-transition: @transition;
119
+ transition: @transition;
120
+ }
121
+
122
+ // Background clipping
123
+ .background-clip(@clip) {
124
+ -webkit-background-clip: @clip;
125
+ -moz-background-clip: @clip;
126
+ background-clip: @clip;
127
+ }
128
+
129
+ // CSS3 Content Columns
130
+ .content-columns(@columnCount, @columnGap: 20px) {
131
+ -webkit-column-count: @columnCount;
132
+ -moz-column-count: @columnCount;
133
+ column-count: @columnCount;
134
+ -webkit-column-gap: @columnGap;
135
+ -moz-column-gap: @columnGap;
136
+ column-gap: @columnGap;
137
+ }
138
+
139
+ // Add an alphatransparency value to any background or border color (via Elyse Holladay)
140
+ #translucent {
141
+ .background(@color: @white, @alpha: 1) {
142
+ background-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha);
143
+ }
144
+ .border(@color: @white, @alpha: 1) {
145
+ border-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha);
146
+ background-clip: padding-box;
147
+ }
148
+ }
149
+
150
+ // Gradient Bar Colors for buttons and allerts
151
+ .gradientBar(@primaryColor, @secondaryColor) {
152
+ #gradient > .vertical(@primaryColor, @secondaryColor);
153
+ text-shadow: 0 -1px 0 rgba(0,0,0,.25);
154
+ border-color: @secondaryColor @secondaryColor darken(@secondaryColor, 15%);
155
+ border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%);
156
+ }
157
+
158
+ // Gradients
159
+ #gradient {
160
+ .horizontal (@startColor: #555, @endColor: #333) {
161
+ background-color: @endColor;
162
+ background-repeat: repeat-x;
163
+ background-image: -khtml-gradient(linear, left top, right top, from(@startColor), to(@endColor)); // Konqueror
164
+ background-image: -moz-linear-gradient(left, @startColor, @endColor); // FF 3.6+
165
+ background-image: -ms-linear-gradient(left, @startColor, @endColor); // IE10
166
+ background-image: -webkit-gradient(linear, left top, right top, color-stop(0%, @startColor), color-stop(100%, @endColor)); // Safari 4+, Chrome 2+
167
+ background-image: -webkit-linear-gradient(left, @startColor, @endColor); // Safari 5.1+, Chrome 10+
168
+ background-image: -o-linear-gradient(left, @startColor, @endColor); // Opera 11.10
169
+ background-image: linear-gradient(left, @startColor, @endColor); // Le standard
170
+ filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",@startColor,@endColor)); // IE9 and down
171
+ }
172
+ .vertical (@startColor: #555, @endColor: #333) {
173
+ background-color: @endColor;
174
+ background-repeat: repeat-x;
175
+ background-image: -khtml-gradient(linear, left top, left bottom, from(@startColor), to(@endColor)); // Konqueror
176
+ background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+
177
+ background-image: -ms-linear-gradient(top, @startColor, @endColor); // IE10
178
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, @startColor), color-stop(100%, @endColor)); // Safari 4+, Chrome 2+
179
+ background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+
180
+ background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10
181
+ background-image: linear-gradient(top, @startColor, @endColor); // The standard
182
+ filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down
183
+ }
184
+ .directional (@startColor: #555, @endColor: #333, @deg: 45deg) {
185
+ background-color: @endColor;
186
+ background-repeat: repeat-x;
187
+ background-image: -moz-linear-gradient(@deg, @startColor, @endColor); // FF 3.6+
188
+ background-image: -ms-linear-gradient(@deg, @startColor, @endColor); // IE10
189
+ background-image: -webkit-linear-gradient(@deg, @startColor, @endColor); // Safari 5.1+, Chrome 10+
190
+ background-image: -o-linear-gradient(@deg, @startColor, @endColor); // Opera 11.10
191
+ background-image: linear-gradient(@deg, @startColor, @endColor); // The standard
192
+ }
193
+ .vertical-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) {
194
+ background-color: @endColor;
195
+ background-repeat: no-repeat;
196
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor));
197
+ background-image: -webkit-linear-gradient(@startColor, @midColor @colorStop, @endColor);
198
+ background-image: -moz-linear-gradient(top, @startColor, @midColor @colorStop, @endColor);
199
+ background-image: -ms-linear-gradient(@startColor, @midColor @colorStop, @endColor);
200
+ background-image: -o-linear-gradient(@startColor, @midColor @colorStop, @endColor);
201
+ background-image: linear-gradient(@startColor, @midColor @colorStop, @endColor);
202
+ filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down, gets no color-stop at all for proper fallback
203
+ }
204
+ }
205
+
206
+ // Reset filters for IE
207
+ .reset-filter() {
208
+ filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"));
209
+ }
210
+
211
+ // Opacity
212
+ .opacity(@opacity: 100) {
213
+ filter: e(%("alpha(opacity=%d)", @opacity));
214
+ -khtml-opacity: @opacity / 100;
215
+ -moz-opacity: @opacity / 100;
216
+ opacity: @opacity / 100;
217
+ }