sass-twitter-bootstrap-rails 0.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +24 -12
- data/lib/generators/bootstrap/install/install_generator.rb +26 -0
- data/lib/generators/bootstrap/install/templates/application.css.scss +1 -0
- data/lib/generators/bootstrap/install/templates/application.js +9 -0
- data/lib/sass-twitter-bootstrap/rails/version.rb +2 -3
- data/sass-twitter-bootstrap-rails.gemspec +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap.js +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +91 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js +98 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +154 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +136 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +92 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +209 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +95 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +125 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +130 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +270 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +51 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +271 -0
- data/vendor/assets/stylesheets/twitter/bootstrap.scss +49 -16
- data/vendor/assets/stylesheets/twitter/bootstrap/accordion.scss +28 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/alerts.scss +70 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/breadcrumbs.scss +22 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/button-groups.scss +146 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/buttons.scss +165 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/carousel.scss +121 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/close.scss +18 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/code.scss +43 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/component-animations.scss +18 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/dropdowns.scss +131 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/forms.scss +497 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/grid.scss +8 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/hero-unit.scss +20 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/labels.scss +16 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/layout.scss +15 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/mixins.scss +461 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/modals.scss +73 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/navbar.scss +292 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/navs.scss +344 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/pager.scss +30 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/pagination.scss +55 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/popovers.scss +49 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/progress-bars.scss +95 -0
- data/vendor/assets/stylesheets/twitter/{reset.scss → bootstrap/reset.scss} +37 -52
- data/vendor/assets/stylesheets/twitter/bootstrap/responsive.scss +323 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/scaffolding.scss +27 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/sprites.scss +156 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/tables.scss +123 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/thumbnails.scss +35 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/tooltip.scss +35 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/type.scss +214 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/utilities.scss +23 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/variables.scss +75 -0
- data/vendor/assets/stylesheets/twitter/bootstrap/wells.scss +17 -0
- metadata +56 -23
- data/vendor/assets/javascripts/twitter/bootstrap-alerts.js +0 -113
- data/vendor/assets/javascripts/twitter/bootstrap-buttons.js +0 -62
- data/vendor/assets/javascripts/twitter/bootstrap-dropdown.js +0 -55
- data/vendor/assets/javascripts/twitter/bootstrap-modal.js +0 -260
- data/vendor/assets/javascripts/twitter/bootstrap-popover.js +0 -86
- data/vendor/assets/javascripts/twitter/bootstrap-scrollspy.js +0 -107
- data/vendor/assets/javascripts/twitter/bootstrap-tabs.js +0 -80
- data/vendor/assets/javascripts/twitter/bootstrap-twipsy.js +0 -310
- data/vendor/assets/stylesheets/twitter/forms.scss +0 -478
- data/vendor/assets/stylesheets/twitter/mixins.scss +0 -220
- data/vendor/assets/stylesheets/twitter/patterns.scss +0 -1060
- data/vendor/assets/stylesheets/twitter/scaffolding.scss +0 -108
- data/vendor/assets/stylesheets/twitter/tables.scss +0 -224
- data/vendor/assets/stylesheets/twitter/type.scss +0 -187
- data/vendor/assets/stylesheets/twitter/variables.scss +0 -60
@@ -0,0 +1,20 @@
|
|
1
|
+
// HERO UNIT
|
2
|
+
// ---------
|
3
|
+
|
4
|
+
.hero-unit {
|
5
|
+
padding: 60px;
|
6
|
+
margin-bottom: 30px;
|
7
|
+
background-color: #f5f5f5;
|
8
|
+
@include border-radius(6px);
|
9
|
+
h1 {
|
10
|
+
margin-bottom: 0;
|
11
|
+
font-size: 60px;
|
12
|
+
line-height: 1;
|
13
|
+
letter-spacing: -1px;
|
14
|
+
}
|
15
|
+
p {
|
16
|
+
font-size: 18px;
|
17
|
+
font-weight: 200;
|
18
|
+
line-height: $baseLineHeight * 1.5;
|
19
|
+
}
|
20
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// LABELS
|
2
|
+
// ------
|
3
|
+
|
4
|
+
.label {
|
5
|
+
padding: 1px 3px 2px;
|
6
|
+
font-size: $baseFontSize * .75;
|
7
|
+
font-weight: bold;
|
8
|
+
color: $white;
|
9
|
+
text-transform: uppercase;
|
10
|
+
background-color: $grayLight;
|
11
|
+
@include border-radius(3px);
|
12
|
+
}
|
13
|
+
.label-important { background-color: $errorText; }
|
14
|
+
.label-warning { background-color: $orange; }
|
15
|
+
.label-success { background-color: $successText; }
|
16
|
+
.label-info { background-color: $infoText; }
|
@@ -0,0 +1,15 @@
|
|
1
|
+
// Layouts
|
2
|
+
// Fixed-width and fluid (with sidebar) layouts
|
3
|
+
// --------------------------------------------
|
4
|
+
|
5
|
+
// Container (centered, fixed-width layouts)
|
6
|
+
.container {
|
7
|
+
@extend container-fixed;
|
8
|
+
}
|
9
|
+
|
10
|
+
// Fluid layouts (left aligned, with sidebar, min- & max-width content)
|
11
|
+
.container-fluid {
|
12
|
+
padding-left: $gridGutterWidth;
|
13
|
+
padding-right: $gridGutterWidth;
|
14
|
+
@include clearfix;
|
15
|
+
}
|
@@ -0,0 +1,461 @@
|
|
1
|
+
// mixins.scss
|
2
|
+
// Snippets of reusable CSS to develop faster and keep code readable
|
3
|
+
// -----------------------------------------------------------------
|
4
|
+
|
5
|
+
// Clearfix for clearing floats like a boss h5bp.com/q
|
6
|
+
@mixin clearfix {
|
7
|
+
zoom: 1;
|
8
|
+
&:before,
|
9
|
+
&:after {
|
10
|
+
display: table;
|
11
|
+
content: "";
|
12
|
+
zoom: 1;
|
13
|
+
}
|
14
|
+
&:after {
|
15
|
+
clear: both;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
.clearfix { @include clearfix; }
|
19
|
+
|
20
|
+
.tab-focus {
|
21
|
+
// Default
|
22
|
+
outline: thin dotted;
|
23
|
+
// Webkit
|
24
|
+
outline: 5px auto -webkit-focus-ring-color;
|
25
|
+
outline-offset: -2px;
|
26
|
+
}
|
27
|
+
|
28
|
+
// Center-align a block level element
|
29
|
+
.center-block {
|
30
|
+
display: block;
|
31
|
+
margin-left: auto;
|
32
|
+
margin-right: auto;
|
33
|
+
}
|
34
|
+
|
35
|
+
.ie7-inline-block {
|
36
|
+
*display: inline;
|
37
|
+
*zoom: 1;
|
38
|
+
}
|
39
|
+
|
40
|
+
// IE7 likes to collapse whitespace on either side of the inline-block elements.
|
41
|
+
// Ems because we're attempting to match the width of a space character. Left
|
42
|
+
// version is for form buttons, which typically come after other elements, and
|
43
|
+
// right version is for icons, which come before. Applying both is ok, but it will
|
44
|
+
// mean that space between those elements will be .6em (~2 space characters) in IE7,
|
45
|
+
// instead of the 1 space in other browsers.
|
46
|
+
.ie7-restore-left-whitespace {
|
47
|
+
*margin-left: 0.3em;
|
48
|
+
&:first-child {
|
49
|
+
*margin-left: 0;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
.ie7-restore-right-whitespace {
|
54
|
+
*margin-right: 0.3em;
|
55
|
+
&:last-child {
|
56
|
+
*margin-right: 0;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
// Sizing shortcuts
|
61
|
+
@mixin size($height: 5px, $width: 5px) {
|
62
|
+
height: $height;
|
63
|
+
width: $width;
|
64
|
+
}
|
65
|
+
@mixin square($size: 5px) {
|
66
|
+
@include size($size, $size);
|
67
|
+
}
|
68
|
+
|
69
|
+
// Input placeholder text
|
70
|
+
@mixin placeholder($color: $placeHolderText) {
|
71
|
+
:-moz-placeholder {
|
72
|
+
color: $color;
|
73
|
+
}
|
74
|
+
::-webkit-input-placeholder {
|
75
|
+
color: $color;
|
76
|
+
}
|
77
|
+
}
|
78
|
+
|
79
|
+
// Fonts
|
80
|
+
// -----------------------------------
|
81
|
+
|
82
|
+
.serif {
|
83
|
+
font-family: Georgia, "Times New Roman", Times, serif;
|
84
|
+
}
|
85
|
+
.sans-serif {
|
86
|
+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
87
|
+
}
|
88
|
+
.monospace {
|
89
|
+
font-family: Menlo, Monaco, "Courier New", monospace;
|
90
|
+
}
|
91
|
+
|
92
|
+
@mixin shorthand($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
|
93
|
+
font-size: $size;
|
94
|
+
font-weight: $weight;
|
95
|
+
line-height: $lineHeight;
|
96
|
+
}
|
97
|
+
|
98
|
+
@mixin serif($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
|
99
|
+
@extend .serif;
|
100
|
+
@include shorthand($size, $weight, $lineHeight)
|
101
|
+
}
|
102
|
+
|
103
|
+
@mixin sans-serif($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
|
104
|
+
@extend .sans-serif;
|
105
|
+
@include shorthand($size, $weight, $lineHeight)
|
106
|
+
}
|
107
|
+
|
108
|
+
@mixin monospace($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
|
109
|
+
@extend .monospace;
|
110
|
+
@include shorthand($size, $weight, $lineHeight)
|
111
|
+
}
|
112
|
+
|
113
|
+
// Grid System
|
114
|
+
// -----------------------------------
|
115
|
+
|
116
|
+
// Site container
|
117
|
+
// -----------------------------------
|
118
|
+
|
119
|
+
.container-fixed {
|
120
|
+
width: $gridRowWidth;
|
121
|
+
margin-left: auto;
|
122
|
+
margin-right: auto;
|
123
|
+
@include clearfix;
|
124
|
+
}
|
125
|
+
|
126
|
+
// Le grid system
|
127
|
+
// -----------------------------------
|
128
|
+
|
129
|
+
@mixin columns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, $columns) {
|
130
|
+
width: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns - 1));
|
131
|
+
}
|
132
|
+
@mixin offset($gridColumnWidth, $gridGutterWidth, $columns) {
|
133
|
+
margin-left: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns - 1)) + ($gridGutterWidth * 2);
|
134
|
+
}
|
135
|
+
@mixin gridColumn($gridGutterWidth) {
|
136
|
+
float: left;
|
137
|
+
margin-left: $gridGutterWidth;
|
138
|
+
}
|
139
|
+
|
140
|
+
@mixin generate($gridColumns, $gridColumnWidth, $gridGutterWidth) {
|
141
|
+
.row {
|
142
|
+
margin-left: $gridGutterWidth * -1;
|
143
|
+
@include clearfix;
|
144
|
+
> [class*="span"] {
|
145
|
+
@include gridColumn($gridGutterWidth);
|
146
|
+
}
|
147
|
+
}
|
148
|
+
|
149
|
+
@for $i from 1 through 11 {
|
150
|
+
.span#{$i} { @include columns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, $i); }
|
151
|
+
}
|
152
|
+
|
153
|
+
.span12,
|
154
|
+
.container { @include columns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 12); }
|
155
|
+
|
156
|
+
@for $i from 1 through 11 {
|
157
|
+
.offset#{$i} { @include offset($gridColumnWidth, $gridGutterWidth, $i); }
|
158
|
+
}
|
159
|
+
}
|
160
|
+
|
161
|
+
// Fluid Grid System
|
162
|
+
// -----------------------------------
|
163
|
+
|
164
|
+
@mixin fluid-columns($fluidGridGutterWidth, $fluidGridColumnWidth, $columns) {
|
165
|
+
width: 0.01 * ($fluidGridColumnWidth * $columns) + ($fluidGridGutterWidth * ($columns - 1));
|
166
|
+
}
|
167
|
+
|
168
|
+
@mixin fluid-gridColumn($fluidGridGutterWidth) {
|
169
|
+
float: left;
|
170
|
+
margin-left: $fluidGridGutterWidth;
|
171
|
+
}
|
172
|
+
|
173
|
+
@mixin fluid-generate($gridColumns, $fluidGridColumnWidth, $fluidGridGutterWidth) {
|
174
|
+
.row-fluid {
|
175
|
+
width: 100%;
|
176
|
+
@include clearfix;
|
177
|
+
|
178
|
+
> [class*="span"] {
|
179
|
+
@include fluid-gridColumn($fluidGridGutterWidth);
|
180
|
+
}
|
181
|
+
|
182
|
+
> [class*="span"]:first-child {
|
183
|
+
margin-left: 0;
|
184
|
+
}
|
185
|
+
|
186
|
+
@for $i from 1 through 11 {
|
187
|
+
.span#{$i} { @include fluid-columns($fluidGridGutterWidth, $fluidGridColumnWidth, $i); }
|
188
|
+
}
|
189
|
+
}
|
190
|
+
}
|
191
|
+
|
192
|
+
// Input grid system
|
193
|
+
// -----------------------------------
|
194
|
+
|
195
|
+
@mixin inputColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, $columns) {
|
196
|
+
width: (($gridColumnWidth) * $columns) + ($gridGutterWidth * ($columns - 1)) - 10;
|
197
|
+
}
|
198
|
+
|
199
|
+
@mixin input-generate($gridColumns, $gridColumnWidth, $gridGutterWidth) {
|
200
|
+
input,
|
201
|
+
textarea,
|
202
|
+
.uneditable-input {
|
203
|
+
@for $i from 1 through 11 {
|
204
|
+
&.span#{$i} { @include inputColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, $i); }
|
205
|
+
}
|
206
|
+
}
|
207
|
+
}
|
208
|
+
|
209
|
+
// CSS3 Properties
|
210
|
+
// -----------------------------------
|
211
|
+
|
212
|
+
// Border Radius
|
213
|
+
@mixin border-radius($radius: 5px) {
|
214
|
+
-webkit-border-radius: $radius;
|
215
|
+
-moz-border-radius: $radius;
|
216
|
+
border-radius: $radius;
|
217
|
+
}
|
218
|
+
|
219
|
+
// Drop shadows
|
220
|
+
@mixin box-shadow($shadow: 0 1px 3px rgba(0,0,0,.25)) {
|
221
|
+
-webkit-box-shadow: $shadow;
|
222
|
+
-moz-box-shadow: $shadow;
|
223
|
+
box-shadow: $shadow;
|
224
|
+
}
|
225
|
+
|
226
|
+
// Transitions
|
227
|
+
@mixin transition($transition) {
|
228
|
+
-webkit-transition: $transition;
|
229
|
+
-moz-transition: $transition;
|
230
|
+
-ms-transition: $transition;
|
231
|
+
-o-transition: $transition;
|
232
|
+
transition: $transition;
|
233
|
+
}
|
234
|
+
|
235
|
+
// Transformations
|
236
|
+
@mixin rotate($degrees) {
|
237
|
+
-webkit-transform: rotate($degrees);
|
238
|
+
-moz-transform: rotate($degrees);
|
239
|
+
-ms-transform: rotate($degrees);
|
240
|
+
-o-transform: rotate($degrees);
|
241
|
+
transform: rotate($degrees);
|
242
|
+
}
|
243
|
+
@mixin scale($ratio) {
|
244
|
+
-webkit-transform: scale($ratio);
|
245
|
+
-moz-transform: scale($ratio);
|
246
|
+
-ms-transform: scale($ratio);
|
247
|
+
-o-transform: scale($ratio);
|
248
|
+
transform: scale($ratio);
|
249
|
+
}
|
250
|
+
@mixin translate($x: 0, $y: 0) {
|
251
|
+
-webkit-transform: translate($x, $y);
|
252
|
+
-moz-transform: translate($x, $y);
|
253
|
+
-ms-transform: translate($x, $y);
|
254
|
+
-o-transform: translate($x, $y);
|
255
|
+
transform: translate($x, $y);
|
256
|
+
}
|
257
|
+
|
258
|
+
// Background clipping
|
259
|
+
@mixin background-clip($clip) {
|
260
|
+
-webkit-background-clip: $clip;
|
261
|
+
-moz-background-clip: $clip;
|
262
|
+
background-clip: $clip;
|
263
|
+
}
|
264
|
+
|
265
|
+
// Background sizing
|
266
|
+
@mixin background-size($size) {
|
267
|
+
-webkit-background-size: $size;
|
268
|
+
-moz-background-size: $size;
|
269
|
+
-o-background-size: $size;
|
270
|
+
background-size: $size;
|
271
|
+
}
|
272
|
+
|
273
|
+
// Box sizing
|
274
|
+
@mixin box-sizing($boxmodel) {
|
275
|
+
-webkit-box-sizing: $boxmodel;
|
276
|
+
-moz-box-sizing: $boxmodel;
|
277
|
+
box-sizing: $boxmodel;
|
278
|
+
}
|
279
|
+
|
280
|
+
// User select
|
281
|
+
// For selecting text on the page
|
282
|
+
@mixin user-select($select) {
|
283
|
+
-webkit-user-select: $select;
|
284
|
+
-moz-user-select: $select;
|
285
|
+
-o-user-select: $select;
|
286
|
+
user-select: $select;
|
287
|
+
}
|
288
|
+
|
289
|
+
// Resize anything
|
290
|
+
@mixin resizable($direction: both) {
|
291
|
+
resize: $direction; // Options are horizontal, vertical, both
|
292
|
+
overflow: auto; // Safari fix
|
293
|
+
}
|
294
|
+
|
295
|
+
// CSS3 Content Columns
|
296
|
+
@mixin content-columns($columnCount, $columnGap: 20px) {
|
297
|
+
-webkit-column-count: $columnCount;
|
298
|
+
-moz-column-count: $columnCount;
|
299
|
+
column-count: $columnCount;
|
300
|
+
-webkit-column-gap: $columnGap;
|
301
|
+
-moz-column-gap: $columnGap;
|
302
|
+
column-gap: $columnGap;
|
303
|
+
}
|
304
|
+
|
305
|
+
// Opacity
|
306
|
+
@mixin opacity($opacity: 100) {
|
307
|
+
opacity: $opacity / 100;
|
308
|
+
filter: alpha(opacity=#{$opacity});
|
309
|
+
}
|
310
|
+
|
311
|
+
// Backgrounds
|
312
|
+
// -----------------------------------
|
313
|
+
|
314
|
+
// Add an alphatransparency value to any background or border color (via Elyse Holladay)
|
315
|
+
@mixin translucent-background($color: $white, $alpha: 1) {
|
316
|
+
background-color: hsla(hue($color), saturation($color), lightness($color), $alpha);
|
317
|
+
}
|
318
|
+
@mixin translucent-border($color: $white, $alpha: 1) {
|
319
|
+
border-color: hsla(hue($color), saturation($color), lightness($color), $alpha);
|
320
|
+
@include background-clip(padding-box);
|
321
|
+
}
|
322
|
+
|
323
|
+
// Gradient Bar Colors for buttons and alerts
|
324
|
+
@mixin gradientBar($primaryColor, $secondaryColor) {
|
325
|
+
@include vertical-gradient($primaryColor, $secondaryColor);
|
326
|
+
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
|
327
|
+
border-color: $secondaryColor $secondaryColor darken($secondaryColor, 15%);
|
328
|
+
border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) opacify(rgba(0,0,0,.1), .15);
|
329
|
+
}
|
330
|
+
|
331
|
+
// Gradients
|
332
|
+
@mixin horizontal-gradient ($startColor: #555, $endColor: #333) {
|
333
|
+
background-color: $endColor;
|
334
|
+
background-image: -moz-linear-gradient(left, $startColor, $endColor); // FF 3.6+
|
335
|
+
background-image: -ms-linear-gradient(left, $startColor, $endColor); // IE10
|
336
|
+
background-image: -webkit-gradient(linear, 0 0, 100% 0, from($startColor), to($endColor)); // Safari 4+, Chrome 2+
|
337
|
+
background-image: -webkit-linear-gradient(left, $startColor, $endColor); // Safari 5.1+, Chrome 10+
|
338
|
+
background-image: -o-linear-gradient(left, $startColor, $endColor); // Opera 11.10
|
339
|
+
background-image: linear-gradient(left, $startColor, $endColor); // Le standard
|
340
|
+
background-repeat: repeat-x;
|
341
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=1); // IE9 and down
|
342
|
+
}
|
343
|
+
|
344
|
+
@mixin vertical-gradient ($startColor: #555, $endColor: #333) {
|
345
|
+
background-color: $endColor;
|
346
|
+
background-image: -moz-linear-gradient(top, $startColor, $endColor); // FF 3.6+
|
347
|
+
background-image: -ms-linear-gradient(top, $startColor, $endColor); // IE10
|
348
|
+
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(0%, $startColor), to(100%, $endColor)); // Safari 4+, Chrome 2+
|
349
|
+
background-image: -webkit-linear-gradient(top, $startColor, $endColor); // Safari 5.1+, Chrome 10+
|
350
|
+
background-image: -o-linear-gradient(top, $startColor, $endColor); // Opera 11.10
|
351
|
+
background-image: linear-gradient(top, $startColor, $endColor); // The standard
|
352
|
+
background-repeat: repeat-x;
|
353
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=0); // IE9 and down
|
354
|
+
}
|
355
|
+
|
356
|
+
@mixin directional-gradient ($startColor: #555, $endColor: #333, $deg: 45deg) {
|
357
|
+
background-color: $endColor;
|
358
|
+
background-repeat: repeat-x;
|
359
|
+
background-image: -moz-linear-gradient($deg, $startColor, $endColor); // FF 3.6+
|
360
|
+
background-image: -ms-linear-gradient($deg, $startColor, $endColor); // IE10
|
361
|
+
background-image: -webkit-linear-gradient($deg, $startColor, $endColor); // Safari 5.1+, Chrome 10+
|
362
|
+
background-image: -o-linear-gradient($deg, $startColor, $endColor); // Opera 11.10
|
363
|
+
background-image: linear-gradient($deg, $startColor, $endColor); // The standard
|
364
|
+
}
|
365
|
+
|
366
|
+
@mixin vertical-three-colors-gradient($startColor: #00b3ee, $midColor: #7a43b6, $colorStop: 50%, $endColor: #c3325f) {
|
367
|
+
background-color: $endColor;
|
368
|
+
background-repeat: no-repeat;
|
369
|
+
background-image: -webkit-gradient(linear, 0 0, 0 100%, from($startColor), color-stop($colorStop, $midColor), to($endColor));
|
370
|
+
background-image: -webkit-linear-gradient($startColor, $midColor $colorStop, $endColor);
|
371
|
+
background-image: -moz-linear-gradient($startColor, $midColor $colorStop, $endColor);
|
372
|
+
background-image: -ms-linear-gradient($startColor, $midColor $colorStop, $endColor);
|
373
|
+
background-image: -o-linear-gradient($startColor, $midColor $colorStop, $endColor);
|
374
|
+
background-image: linear-gradient($startColor, $midColor $colorStop, $endColor);
|
375
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=0); // IE9 and down, gets no color-stop at all the proper fallback
|
376
|
+
}
|
377
|
+
|
378
|
+
@mixin radial-gradient($innerColor: #555, $outerColor: #333) {
|
379
|
+
background-color: $outerColor;
|
380
|
+
background-image: -webkit-gradient(radial, center center, 0, center center, 460, from($innerColor), to($outerColor));
|
381
|
+
background-image: -webkit-radial-gradient(circle, $innerColor, $outerColor);
|
382
|
+
background-image: -moz-radial-gradient(circle, $innerColor, $outerColor);
|
383
|
+
background-image: -ms-radial-gradient(circle, $innerColor, $outerColor);
|
384
|
+
background-repeat: no-repeat;
|
385
|
+
}
|
386
|
+
|
387
|
+
@mixin striped-gradient($color, $angle: -45deg) {
|
388
|
+
background-color: $color;
|
389
|
+
background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, rgba(255,255,255,.15)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, rgba(255,255,255,.15)), color-stop(.75, rgba(255,255,255,.15)), color-stop(.75, transparent), to(transparent));
|
390
|
+
background-image: -webkit-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
|
391
|
+
background-image: -moz-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
|
392
|
+
background-image: -ms-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
|
393
|
+
background-image: -o-linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
|
394
|
+
background-image: linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
|
395
|
+
}
|
396
|
+
|
397
|
+
// Reset filters for IE
|
398
|
+
@mixin reset-filter() {
|
399
|
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
400
|
+
}
|
401
|
+
|
402
|
+
// Mixin for generating button backgrounds
|
403
|
+
// -----------------------------------
|
404
|
+
|
405
|
+
@mixin buttonBackground($startColor, $endColor) {
|
406
|
+
@include gradientBar($startColor, $endColor);
|
407
|
+
@include reset-filter;
|
408
|
+
|
409
|
+
// in these cases the gradient won't cover the background, so we override
|
410
|
+
&:hover, &:active, &.active, &.disabled, &[disabled] {
|
411
|
+
background-color: $endColor;
|
412
|
+
}
|
413
|
+
|
414
|
+
// IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves
|
415
|
+
&:active,
|
416
|
+
&.active {
|
417
|
+
background-color: darken($endColor, 10%) e("\9");
|
418
|
+
}
|
419
|
+
}
|
420
|
+
|
421
|
+
// Component mixins
|
422
|
+
// -----------------------------------
|
423
|
+
|
424
|
+
// Popover arrows
|
425
|
+
// -----------------------------------
|
426
|
+
|
427
|
+
@mixin popover-top($arrowWidth: 5px) {
|
428
|
+
bottom: 0;
|
429
|
+
left: 50%;
|
430
|
+
margin-left: -$arrowWidth;
|
431
|
+
border-left: $arrowWidth solid transparent;
|
432
|
+
border-right: $arrowWidth solid transparent;
|
433
|
+
border-top: $arrowWidth solid $black;
|
434
|
+
}
|
435
|
+
|
436
|
+
@mixin popover-left($arrowWidth: 5px) {
|
437
|
+
top: 50%;
|
438
|
+
right: 0;
|
439
|
+
margin-top: -$arrowWidth;
|
440
|
+
border-top: $arrowWidth solid transparent;
|
441
|
+
border-bottom: $arrowWidth solid transparent;
|
442
|
+
border-left: $arrowWidth solid $black;
|
443
|
+
}
|
444
|
+
|
445
|
+
@mixin popover-bottom($arrowWidth: 5px) {
|
446
|
+
top: 0;
|
447
|
+
left: 50%;
|
448
|
+
margin-left: -$arrowWidth;
|
449
|
+
border-left: $arrowWidth solid transparent;
|
450
|
+
border-right: $arrowWidth solid transparent;
|
451
|
+
border-bottom: $arrowWidth solid $black;
|
452
|
+
}
|
453
|
+
|
454
|
+
@mixin popover-right($arrowWidth: 5px) {
|
455
|
+
top: 50%;
|
456
|
+
left: 0;
|
457
|
+
margin-top: -$arrowWidth;
|
458
|
+
border-top: $arrowWidth solid transparent;
|
459
|
+
border-bottom: $arrowWidth solid transparent;
|
460
|
+
border-right: $arrowWidth solid $black;
|
461
|
+
}
|