google-buttons-sass 0.1.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/LICENSE +14 -0
- data/README.md +91 -0
- data/lib/google-buttons-sass/compass_functions.rb +10 -0
- data/lib/google-buttons-sass/engine.rb +7 -0
- data/lib/google-buttons-sass/rails_functions.rb +14 -0
- data/lib/google-buttons-sass.rb +43 -0
- data/templates/project/manifest.rb +17 -0
- data/templates/project/styles.scss +3 -0
- data/vendor/assets/images/checkmark.png +0 -0
- data/vendor/assets/images/grey-disclosure-arrow-up-down.png +0 -0
- data/vendor/assets/javascripts/bootstrap-popover.js +98 -0
- data/vendor/assets/javascripts/google-buttons.js +3 -0
- data/vendor/assets/javascripts/google-select-dropdown.js +89 -0
- data/vendor/assets/javascripts/google-select.js +84 -0
- data/vendor/assets/stylesheets/alerts.scss +21 -0
- data/vendor/assets/stylesheets/bootstrap-mixins.scss +625 -0
- data/vendor/assets/stylesheets/breadcrumbs.scss +8 -0
- data/vendor/assets/stylesheets/button-groups.scss +124 -0
- data/vendor/assets/stylesheets/buttons.scss +396 -0
- data/vendor/assets/stylesheets/dropdowns.scss +95 -0
- data/vendor/assets/stylesheets/forms.scss +229 -0
- data/vendor/assets/stylesheets/google-buttons.scss +42 -0
- data/vendor/assets/stylesheets/mixins.scss +44 -0
- data/vendor/assets/stylesheets/navs.scss +76 -0
- data/vendor/assets/stylesheets/pager.scss +40 -0
- data/vendor/assets/stylesheets/pagination.scss +68 -0
- data/vendor/assets/stylesheets/popovers.scss +36 -0
- data/vendor/assets/stylesheets/progress-bars.scss +7 -0
- data/vendor/assets/stylesheets/scrollbars.scss +43 -0
- data/vendor/assets/stylesheets/sprites.scss +12 -0
- data/vendor/assets/stylesheets/tooltip.scss +10 -0
- data/vendor/assets/stylesheets/variables.scss +199 -0
- data/vendor/assets/stylesheets/wells.scss +17 -0
- metadata +127 -0
@@ -0,0 +1,625 @@
|
|
1
|
+
// Mixins.less
|
2
|
+
// Snippets of reusable CSS to develop faster and keep code readable
|
3
|
+
// -----------------------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
// UTILITY MIXINS
|
7
|
+
// --------------------------------------------------
|
8
|
+
|
9
|
+
// Clearfix
|
10
|
+
// --------
|
11
|
+
// For clearing floats like a boss h5bp.com/q
|
12
|
+
@mixin clearfix() {
|
13
|
+
*zoom: 1;
|
14
|
+
&:before,
|
15
|
+
&:after {
|
16
|
+
display: table;
|
17
|
+
content: "";
|
18
|
+
}
|
19
|
+
&:after {
|
20
|
+
clear: both;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
.clearfix { @include clearfix(); }
|
24
|
+
|
25
|
+
// Webkit-style focus
|
26
|
+
// ------------------
|
27
|
+
@mixin tab-focus() {
|
28
|
+
// Default
|
29
|
+
outline: thin dotted #333;
|
30
|
+
// Webkit
|
31
|
+
outline: 5px auto -webkit-focus-ring-color;
|
32
|
+
outline-offset: -2px;
|
33
|
+
}
|
34
|
+
|
35
|
+
// Center-align a block level element
|
36
|
+
// ----------------------------------
|
37
|
+
@mixin center-block() {
|
38
|
+
display: block;
|
39
|
+
margin-left: auto;
|
40
|
+
margin-right: auto;
|
41
|
+
}
|
42
|
+
|
43
|
+
// IE7 inline-block
|
44
|
+
// ----------------
|
45
|
+
@mixin ie7-inline-block() {
|
46
|
+
*display: inline; /* IE7 inline-block hack */
|
47
|
+
*zoom: 1;
|
48
|
+
}
|
49
|
+
|
50
|
+
// IE7 likes to collapse whitespace on either side of the inline-block elements.
|
51
|
+
// Ems because we're attempting to match the width of a space character. Left
|
52
|
+
// version is for form buttons, which typically come after other elements, and
|
53
|
+
// right version is for icons, which come before. Applying both is ok, but it will
|
54
|
+
// mean that space between those elements will be .6em (~2 space characters) in IE7,
|
55
|
+
// instead of the 1 space in other browsers.
|
56
|
+
@mixin ie7-restore-left-whitespace() {
|
57
|
+
*margin-left: .3em;
|
58
|
+
|
59
|
+
&:first-child {
|
60
|
+
*margin-left: 0;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
@mixin ie7-restore-right-whitespace() {
|
65
|
+
*margin-right: .3em;
|
66
|
+
|
67
|
+
&:last-child {
|
68
|
+
*margin-left: 0;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
|
72
|
+
// Sizing shortcuts
|
73
|
+
// -------------------------
|
74
|
+
@mixin size($height, $width) {
|
75
|
+
width: $width;
|
76
|
+
height: $height;
|
77
|
+
}
|
78
|
+
@mixin square($size) {
|
79
|
+
@include size($size, $size);
|
80
|
+
}
|
81
|
+
|
82
|
+
// Placeholder text
|
83
|
+
// -------------------------
|
84
|
+
@mixin placeholder($color: $placeholderText) {
|
85
|
+
&:-moz-placeholder {
|
86
|
+
color: $color;
|
87
|
+
}
|
88
|
+
&:-ms-input-placeholder {
|
89
|
+
color: $color;
|
90
|
+
}
|
91
|
+
&::-webkit-input-placeholder {
|
92
|
+
color: $color;
|
93
|
+
}
|
94
|
+
}
|
95
|
+
|
96
|
+
// Sass doesn't support using & at base level, so we need a special root placeholder mixin.
|
97
|
+
@mixin rootPlaceholder($color: $placeholderText) {
|
98
|
+
:-moz-placeholder {
|
99
|
+
color: $color;
|
100
|
+
}
|
101
|
+
:-ms-input-placeholder {
|
102
|
+
color: $color;
|
103
|
+
}
|
104
|
+
::-webkit-input-placeholder {
|
105
|
+
color: $color;
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
109
|
+
// Text overflow
|
110
|
+
// ------------------------
|
111
|
+
@mixin text-overflow() {
|
112
|
+
overflow: hidden;
|
113
|
+
text-overflow: ellipsis;
|
114
|
+
white-space: nowrap;
|
115
|
+
}
|
116
|
+
|
117
|
+
// CSS image replacement
|
118
|
+
// -------------------------
|
119
|
+
// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
|
120
|
+
@mixin hide-text() {
|
121
|
+
font: 0/0 a;
|
122
|
+
color: transparent;
|
123
|
+
text-shadow: none;
|
124
|
+
background-color: transparent;
|
125
|
+
border: 0;
|
126
|
+
}
|
127
|
+
|
128
|
+
|
129
|
+
// FONTS
|
130
|
+
// --------------------------------------------------
|
131
|
+
@mixin font-family-serif() {
|
132
|
+
font-family: $serifFontFamily;
|
133
|
+
}
|
134
|
+
@mixin font-family-sans-serif() {
|
135
|
+
font-family: $sansFontFamily;
|
136
|
+
}
|
137
|
+
@mixin font-family-monospace() {
|
138
|
+
font-family: $monoFontFamily;
|
139
|
+
}
|
140
|
+
@mixin font-shorthand($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
|
141
|
+
font-size: $size;
|
142
|
+
font-weight: $weight;
|
143
|
+
line-height: $lineHeight;
|
144
|
+
}
|
145
|
+
@mixin font-serif($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
|
146
|
+
@include font-family-serif();
|
147
|
+
@include font-shorthand($size, $weight, $lineHeight);
|
148
|
+
}
|
149
|
+
@mixin font-sans-serif($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
|
150
|
+
@include font-family-sans-serif();
|
151
|
+
@include font-shorthand($size, $weight, $lineHeight);
|
152
|
+
}
|
153
|
+
@mixin font-monospace($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
|
154
|
+
@include font-family-monospace();
|
155
|
+
@include font-shorthand($size, $weight, $lineHeight);
|
156
|
+
}
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
// FORMS
|
161
|
+
// --------------------------------------------------
|
162
|
+
|
163
|
+
@mixin input-block-level() {
|
164
|
+
display: block;
|
165
|
+
width: 100%;
|
166
|
+
min-height: 28px; // Make inputs at least the height of their button counterpart
|
167
|
+
@include box-sizing(border-box); // Makes inputs behave like true block-level elements
|
168
|
+
}
|
169
|
+
|
170
|
+
|
171
|
+
// Mixin for form field states
|
172
|
+
@mixin formFieldState($textColor: #555, $borderColor: #ccc, $backgroundColor: #f5f5f5) {
|
173
|
+
// Set the text color
|
174
|
+
> label, .help-block, .help-inline {
|
175
|
+
color: $textColor;
|
176
|
+
}
|
177
|
+
// Style inputs accordingly
|
178
|
+
.checkbox, .radio, input, select, textarea {
|
179
|
+
color: $textColor;
|
180
|
+
border-color: $borderColor;
|
181
|
+
&:focus {
|
182
|
+
border-color: darken($borderColor, 10%);
|
183
|
+
@include box-shadow(0 0 6px lighten($borderColor, 20%));
|
184
|
+
}
|
185
|
+
}
|
186
|
+
// Give a small background color for input-prepend/-append
|
187
|
+
.input-prepend .add-on, .input-append .add-on {
|
188
|
+
color: $textColor;
|
189
|
+
background-color: $backgroundColor;
|
190
|
+
border-color: $textColor;
|
191
|
+
}
|
192
|
+
}
|
193
|
+
|
194
|
+
|
195
|
+
// CSS3 PROPERTIES
|
196
|
+
// --------------------------------------------------
|
197
|
+
|
198
|
+
// Border Radius
|
199
|
+
@mixin border-radius($radius) {
|
200
|
+
-webkit-border-radius: $radius;
|
201
|
+
-moz-border-radius: $radius;
|
202
|
+
border-radius: $radius;
|
203
|
+
}
|
204
|
+
|
205
|
+
// Drop shadows
|
206
|
+
@mixin box-shadow($shadow) {
|
207
|
+
-webkit-box-shadow: $shadow;
|
208
|
+
-moz-box-shadow: $shadow;
|
209
|
+
box-shadow: $shadow;
|
210
|
+
}
|
211
|
+
|
212
|
+
// Transitions
|
213
|
+
@mixin transition($transition) {
|
214
|
+
-webkit-transition: $transition;
|
215
|
+
-moz-transition: $transition;
|
216
|
+
-ms-transition: $transition;
|
217
|
+
-o-transition: $transition;
|
218
|
+
transition: $transition;
|
219
|
+
}
|
220
|
+
|
221
|
+
// Transformations
|
222
|
+
@mixin rotate($degrees) {
|
223
|
+
-webkit-transform: rotate($degrees);
|
224
|
+
-moz-transform: rotate($degrees);
|
225
|
+
-ms-transform: rotate($degrees);
|
226
|
+
-o-transform: rotate($degrees);
|
227
|
+
transform: rotate($degrees);
|
228
|
+
}
|
229
|
+
@mixin scale($ratio) {
|
230
|
+
-webkit-transform: scale($ratio);
|
231
|
+
-moz-transform: scale($ratio);
|
232
|
+
-ms-transform: scale($ratio);
|
233
|
+
-o-transform: scale($ratio);
|
234
|
+
transform: scale($ratio);
|
235
|
+
}
|
236
|
+
@mixin translate($x, $y) {
|
237
|
+
-webkit-transform: translate($x, $y);
|
238
|
+
-moz-transform: translate($x, $y);
|
239
|
+
-ms-transform: translate($x, $y);
|
240
|
+
-o-transform: translate($x, $y);
|
241
|
+
transform: translate($x, $y);
|
242
|
+
}
|
243
|
+
|
244
|
+
@mixin skew($x, $y) {
|
245
|
+
-webkit-transform: skew($x, $y);
|
246
|
+
-moz-transform: skew($x, $y);
|
247
|
+
-ms-transform: skew($x, $y);
|
248
|
+
-o-transform: skew($x, $y);
|
249
|
+
transform: skew($x, $y);
|
250
|
+
}
|
251
|
+
|
252
|
+
@mixin translate3d($x, $y, $z) {
|
253
|
+
-webkit-transform: translate($x, $y, $z);
|
254
|
+
-moz-transform: translate($x, $y, $z);
|
255
|
+
-ms-transform: translate($x, $y, $z);
|
256
|
+
-o-transform: translate($x, $y, $z);
|
257
|
+
transform: translate($x, $y, $z);
|
258
|
+
}
|
259
|
+
|
260
|
+
// Backface visibility
|
261
|
+
// Prevent browsers from flickering when using CSS 3D transforms.
|
262
|
+
// Default value is `visible`, but can be changed to `hidden
|
263
|
+
// See git pull https://github.com/dannykeane/bootstrap.git backface-visibility for examples
|
264
|
+
@mixin backface-visibility($visibility){
|
265
|
+
-webkit-backface-visibility: $visibility;
|
266
|
+
-moz-backface-visibility: $visibility;
|
267
|
+
-ms-backface-visibility: $visibility;
|
268
|
+
backface-visibility: $visibility;
|
269
|
+
}
|
270
|
+
|
271
|
+
// Background clipping
|
272
|
+
// Heads up: FF 3.6 and under need "padding" instead of "padding-box"
|
273
|
+
@mixin background-clip($clip) {
|
274
|
+
-webkit-background-clip: $clip;
|
275
|
+
-moz-background-clip: $clip;
|
276
|
+
background-clip: $clip;
|
277
|
+
}
|
278
|
+
|
279
|
+
// Background sizing
|
280
|
+
@mixin background-size($size){
|
281
|
+
-webkit-background-size: $size;
|
282
|
+
-moz-background-size: $size;
|
283
|
+
-o-background-size: $size;
|
284
|
+
background-size: $size;
|
285
|
+
}
|
286
|
+
|
287
|
+
|
288
|
+
// Box sizing
|
289
|
+
@mixin box-sizing($boxmodel) {
|
290
|
+
-webkit-box-sizing: $boxmodel;
|
291
|
+
-moz-box-sizing: $boxmodel;
|
292
|
+
-ms-box-sizing: $boxmodel;
|
293
|
+
box-sizing: $boxmodel;
|
294
|
+
}
|
295
|
+
|
296
|
+
// User select
|
297
|
+
// For selecting text on the page
|
298
|
+
@mixin user-select($select) {
|
299
|
+
-webkit-user-select: $select;
|
300
|
+
-moz-user-select: $select;
|
301
|
+
-ms-user-select: $select;
|
302
|
+
-o-user-select: $select;
|
303
|
+
user-select: $select;
|
304
|
+
}
|
305
|
+
|
306
|
+
// Resize anything
|
307
|
+
@mixin resizable($direction) {
|
308
|
+
resize: $direction; // Options: horizontal, vertical, both
|
309
|
+
overflow: auto; // Safari fix
|
310
|
+
}
|
311
|
+
|
312
|
+
// CSS3 Content Columns
|
313
|
+
@mixin content-columns($columnCount, $columnGap: $gridGutterWidth) {
|
314
|
+
-webkit-column-count: $columnCount;
|
315
|
+
-moz-column-count: $columnCount;
|
316
|
+
column-count: $columnCount;
|
317
|
+
-webkit-column-gap: $columnGap;
|
318
|
+
-moz-column-gap: $columnGap;
|
319
|
+
column-gap: $columnGap;
|
320
|
+
}
|
321
|
+
|
322
|
+
|
323
|
+
// Optional hyphenation
|
324
|
+
@mixin hyphens($mode: auto) {
|
325
|
+
word-wrap: break-word;
|
326
|
+
-webkit-hyphens: $mode;
|
327
|
+
-moz-hyphens: $mode;
|
328
|
+
-ms-hyphens: $mode;
|
329
|
+
-o-hyphens: $mode;
|
330
|
+
hyphens: $mode;
|
331
|
+
}
|
332
|
+
|
333
|
+
// Opacity
|
334
|
+
@mixin opacity($opacity: 1) {
|
335
|
+
opacity: $opacity;
|
336
|
+
filter: alpha(opacity=#{$opacity * 100});
|
337
|
+
}
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
// BACKGROUNDS
|
342
|
+
// --------------------------------------------------
|
343
|
+
|
344
|
+
// Add an alphatransparency value to any background or border color (via Elyse Holladay)
|
345
|
+
@mixin translucent-background($color: $white, $alpha: 1) {
|
346
|
+
background-color: hsla(hue($color), saturation($color), lightness($color), $alpha);
|
347
|
+
}
|
348
|
+
@mixin translucent-border($color: $white, $alpha: 1) {
|
349
|
+
border-color: hsla(hue($color), saturation($color), lightness($color), $alpha);
|
350
|
+
@include background-clip(padding-box);
|
351
|
+
}
|
352
|
+
|
353
|
+
// Gradient Bar Colors for buttons and alerts
|
354
|
+
@mixin gradientBar($primaryColor, $secondaryColor) {
|
355
|
+
@include gradient-vertical($primaryColor, $secondaryColor);
|
356
|
+
border-color: $secondaryColor $secondaryColor darken($secondaryColor, 15%);
|
357
|
+
border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%);
|
358
|
+
}
|
359
|
+
|
360
|
+
// Gradients
|
361
|
+
@mixin gradient-horizontal($startColor: #555, $endColor: #333) {
|
362
|
+
background-color: $endColor;
|
363
|
+
background-image: -moz-linear-gradient(left, $startColor, $endColor); // FF 3.6+
|
364
|
+
background-image: -ms-linear-gradient(left, $startColor, $endColor); // IE10
|
365
|
+
background-image: -webkit-gradient(linear, 0 0, 100% 0, from($startColor), to($endColor)); // Safari 4+, Chrome 2+
|
366
|
+
background-image: -webkit-linear-gradient(left, $startColor, $endColor); // Safari 5.1+, Chrome 10+
|
367
|
+
background-image: -o-linear-gradient(left, $startColor, $endColor); // Opera 11.10
|
368
|
+
background-image: linear-gradient(left, $startColor, $endColor); // Le standard
|
369
|
+
background-repeat: repeat-x;
|
370
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($startColor)}', endColorstr='#{ie-hex-str($endColor)}', GradientType=1); // IE9 and down
|
371
|
+
}
|
372
|
+
@mixin gradient-vertical($startColor: #555, $endColor: #333) {
|
373
|
+
background-color: mix($startColor, $endColor, 60%);
|
374
|
+
background-image: -moz-linear-gradient(top, $startColor, $endColor); // FF 3.6+
|
375
|
+
background-image: -ms-linear-gradient(top, $startColor, $endColor); // IE10
|
376
|
+
background-image: -webkit-gradient(linear, 0 0, 0 100%, from($startColor), to($endColor)); // Safari 4+, Chrome 2+
|
377
|
+
background-image: -webkit-linear-gradient(top, $startColor, $endColor); // Safari 5.1+, Chrome 10+
|
378
|
+
background-image: -o-linear-gradient(top, $startColor, $endColor); // Opera 11.10
|
379
|
+
background-image: linear-gradient(top, $startColor, $endColor); // The standard
|
380
|
+
background-repeat: repeat-x;
|
381
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($startColor)}', endColorstr='#{ie-hex-str($endColor)}', GradientType=0); // IE9 and down
|
382
|
+
}
|
383
|
+
@mixin gradient-directional($startColor: #555, $endColor: #333, $deg: 45deg) {
|
384
|
+
background-color: $endColor;
|
385
|
+
background-repeat: repeat-x;
|
386
|
+
background-image: -moz-linear-gradient($deg, $startColor, $endColor); // FF 3.6+
|
387
|
+
background-image: -ms-linear-gradient($deg, $startColor, $endColor); // IE10
|
388
|
+
background-image: -webkit-linear-gradient($deg, $startColor, $endColor); // Safari 5.1+, Chrome 10+
|
389
|
+
background-image: -o-linear-gradient($deg, $startColor, $endColor); // Opera 11.10
|
390
|
+
background-image: linear-gradient($deg, $startColor, $endColor); // The standard
|
391
|
+
}
|
392
|
+
@mixin gradient-vertical-three-colors($startColor: #00b3ee, $midColor: #7a43b6, $colorStop: 50%, $endColor: #c3325f) {
|
393
|
+
background-color: mix($midColor, $endColor, 80%);
|
394
|
+
background-image: -webkit-gradient(linear, 0 0, 0 100%, from($startColor), color-stop($colorStop, $midColor), to($endColor));
|
395
|
+
background-image: -webkit-linear-gradient($startColor, $midColor $colorStop, $endColor);
|
396
|
+
background-image: -moz-linear-gradient(top, $startColor, $midColor $colorStop, $endColor);
|
397
|
+
background-image: -ms-linear-gradient($startColor, $midColor $colorStop, $endColor);
|
398
|
+
background-image: -o-linear-gradient($startColor, $midColor $colorStop, $endColor);
|
399
|
+
background-image: linear-gradient($startColor, $midColor $colorStop, $endColor);
|
400
|
+
background-repeat: no-repeat;
|
401
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($startColor)}', endColorstr='#{ie-hex-str($endColor)}', GradientType=0); // IE9 and down, gets no color-stop at all for proper fallback
|
402
|
+
}
|
403
|
+
@mixin gradient-radial($innerColor: #555, $outerColor: #333) {
|
404
|
+
background-color: $outerColor;
|
405
|
+
background-image: -webkit-gradient(radial, center center, 0, center center, 460, from($innerColor), to($outerColor));
|
406
|
+
background-image: -webkit-radial-gradient(circle, $innerColor, $outerColor);
|
407
|
+
background-image: -moz-radial-gradient(circle, $innerColor, $outerColor);
|
408
|
+
background-image: -ms-radial-gradient(circle, $innerColor, $outerColor);
|
409
|
+
background-image: -o-radial-gradient(circle, $innerColor, $outerColor);
|
410
|
+
background-repeat: no-repeat;
|
411
|
+
}
|
412
|
+
@mixin gradient-striped($color, $angle: -45deg) {
|
413
|
+
background-color: $color;
|
414
|
+
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));
|
415
|
+
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);
|
416
|
+
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);
|
417
|
+
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);
|
418
|
+
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);
|
419
|
+
background-image: linear-gradient($angle, rgba(255,255,255,.15) 25%, rgba(255,255,255,0) 25%, rgba(255,255,255,0) 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, rgba(255,255,255,0) 75%, rgba(255,255,255,0));
|
420
|
+
}
|
421
|
+
// Reset filters for IE
|
422
|
+
@mixin reset-filter() {
|
423
|
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
424
|
+
}
|
425
|
+
|
426
|
+
|
427
|
+
// COMPONENT MIXINS
|
428
|
+
// --------------------------------------------------
|
429
|
+
|
430
|
+
// Horizontal dividers
|
431
|
+
// -------------------
|
432
|
+
// Dividers (basically an hr) within dropdowns and nav lists
|
433
|
+
@mixin nav-divider($top: #e5e5e5, $bottom: $white) {
|
434
|
+
// IE7 needs a set width since we gave a height. Restricting just
|
435
|
+
// to IE7 to keep the 1px left/right space in other browsers.
|
436
|
+
// It is unclear where IE is getting the extra space that we need
|
437
|
+
// to negative-margin away, but so it goes.
|
438
|
+
*width: 100%;
|
439
|
+
height: 1px;
|
440
|
+
margin: (($baseLineHeight / 2) - 1) 1px; // 8px 1px
|
441
|
+
*margin: -5px 0 5px;
|
442
|
+
overflow: hidden;
|
443
|
+
background-color: $top;
|
444
|
+
border-bottom: 1px solid $bottom;
|
445
|
+
}
|
446
|
+
|
447
|
+
// Button backgrounds
|
448
|
+
// ------------------
|
449
|
+
@mixin buttonBackground($startColor, $endColor) {
|
450
|
+
// gradientBar will set the background to a pleasing blend of these, to support IE<=9
|
451
|
+
@include gradientBar($startColor, $endColor);
|
452
|
+
*background-color: $endColor; // Darken IE7 buttons by default so they stand out more given they won't have borders
|
453
|
+
@include reset-filter();
|
454
|
+
|
455
|
+
// in these cases the gradient won't cover the background, so we override
|
456
|
+
&:hover, &:active, &.active, &.disabled, &[disabled] {
|
457
|
+
background-color: $endColor;
|
458
|
+
*background-color: darken($endColor, 5%);
|
459
|
+
}
|
460
|
+
|
461
|
+
// IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves
|
462
|
+
&:active, &.active {
|
463
|
+
background-color: darken($endColor, 10%) \9;
|
464
|
+
}
|
465
|
+
}
|
466
|
+
|
467
|
+
// Navbar vertical align
|
468
|
+
// -------------------------
|
469
|
+
// Vertically center elements in the navbar.
|
470
|
+
// Example: an element has a height of 30px, so write out `.navbarVerticalAlign(30px);` to calculate the appropriate top margin.
|
471
|
+
@mixin navbarVerticalAlign($elementHeight) {
|
472
|
+
margin-top: ($navbarHeight - $elementHeight) / 2;
|
473
|
+
}
|
474
|
+
|
475
|
+
// Popover arrows
|
476
|
+
// -------------------------
|
477
|
+
// For tipsies and popovers
|
478
|
+
@mixin popoverArrowTop($arrowWidth: 5px, $color: $black) {
|
479
|
+
bottom: 0;
|
480
|
+
left: 50%;
|
481
|
+
margin-left: -$arrowWidth;
|
482
|
+
border-left: $arrowWidth solid transparent;
|
483
|
+
border-right: $arrowWidth solid transparent;
|
484
|
+
border-top: $arrowWidth solid $color;
|
485
|
+
}
|
486
|
+
@mixin popoverArrowLeft($arrowWidth: 5px, $color: $black) {
|
487
|
+
top: 50%;
|
488
|
+
right: 0;
|
489
|
+
margin-top: -$arrowWidth;
|
490
|
+
border-top: $arrowWidth solid transparent;
|
491
|
+
border-bottom: $arrowWidth solid transparent;
|
492
|
+
border-left: $arrowWidth solid $color;
|
493
|
+
}
|
494
|
+
@mixin popoverArrowBottom($arrowWidth: 5px, $color: $black) {
|
495
|
+
top: 0;
|
496
|
+
left: 50%;
|
497
|
+
margin-left: -$arrowWidth;
|
498
|
+
border-left: $arrowWidth solid transparent;
|
499
|
+
border-right: $arrowWidth solid transparent;
|
500
|
+
border-bottom: $arrowWidth solid $color;
|
501
|
+
}
|
502
|
+
@mixin popoverArrowRight($arrowWidth: 5px, $color: $black) {
|
503
|
+
top: 50%;
|
504
|
+
left: 0;
|
505
|
+
margin-top: -$arrowWidth;
|
506
|
+
border-top: $arrowWidth solid transparent;
|
507
|
+
border-bottom: $arrowWidth solid transparent;
|
508
|
+
border-right: $arrowWidth solid $color;
|
509
|
+
}
|
510
|
+
|
511
|
+
// Grid System
|
512
|
+
// -----------
|
513
|
+
|
514
|
+
// Centered container element
|
515
|
+
@mixin container-fixed() {
|
516
|
+
margin-right: auto;
|
517
|
+
margin-left: auto;
|
518
|
+
@include clearfix();
|
519
|
+
}
|
520
|
+
|
521
|
+
// Table columns
|
522
|
+
@mixin tableColumns($columnSpan: 1) {
|
523
|
+
float: none; // undo default grid column styles
|
524
|
+
width: (($gridColumnWidth) * $columnSpan) + ($gridGutterWidth * ($columnSpan - 1)) - 16; // 16 is total padding on left and right of table cells
|
525
|
+
margin-left: 0; // undo default grid column styles
|
526
|
+
}
|
527
|
+
|
528
|
+
// Make a Grid
|
529
|
+
// Use .makeRow and .makeColumn to assign semantic layouts grid system behavior
|
530
|
+
@mixin makeRow() {
|
531
|
+
margin-left: $gridGutterWidth * -1;
|
532
|
+
@include clearfix();
|
533
|
+
}
|
534
|
+
@mixin makeColumn($columns: 1, $offset: 0) {
|
535
|
+
float: left;
|
536
|
+
margin-left: ($gridColumnWidth * $offset) + ($gridGutterWidth * ($offset - 1)) + ($gridGutterWidth * 2);
|
537
|
+
width: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns - 1));
|
538
|
+
}
|
539
|
+
|
540
|
+
// The Grid
|
541
|
+
@mixin gridCore($columnWidth, $gutterWidth) {
|
542
|
+
.row {
|
543
|
+
margin-left: $gutterWidth * -1;
|
544
|
+
@include clearfix();
|
545
|
+
}
|
546
|
+
|
547
|
+
[class*="span"] {
|
548
|
+
float: left;
|
549
|
+
margin-left: $gutterWidth;
|
550
|
+
}
|
551
|
+
|
552
|
+
// Set the container width, and override it for fixed navbars in media queries
|
553
|
+
.container, .navbar-fixed-top .container, .navbar-fixed-bottom .container { @include gridCoreSpan($gridColumns, $columnWidth, $gutterWidth); }
|
554
|
+
|
555
|
+
@include gridCoreSpanX($gridColumns, $columnWidth, $gutterWidth);
|
556
|
+
@include gridCoreOffsetX($gridColumns, $columnWidth, $gutterWidth);
|
557
|
+
}
|
558
|
+
@mixin gridCoreSpanX($cols, $columnWidth, $gutterWidth) {
|
559
|
+
@for $i from 1 through $cols {
|
560
|
+
.span#{$i} { @include gridCoreSpan($i, $columnWidth, $gutterWidth) };
|
561
|
+
}
|
562
|
+
}
|
563
|
+
@mixin gridCoreSpan($columns, $columnWidth, $gutterWidth) {
|
564
|
+
width: ($columnWidth * $columns) + ($gutterWidth * ($columns - 1));
|
565
|
+
}
|
566
|
+
@mixin gridCoreOffsetX($cols, $columnWidth, $gutterWidth) {
|
567
|
+
@for $i from 1 through $cols {
|
568
|
+
.offset#{$i} { @include gridCoreOffset($i, $columnWidth, $gutterWidth); };
|
569
|
+
}
|
570
|
+
}
|
571
|
+
@mixin gridCoreOffset($columns, $columnWidth, $gutterWidth) {
|
572
|
+
margin-left: ($columnWidth * $columns) + ($gutterWidth * ($columns + 1));
|
573
|
+
}
|
574
|
+
|
575
|
+
@mixin gridFluid($columnWidth, $gutterWidth) {
|
576
|
+
.row-fluid {
|
577
|
+
width: 100%;
|
578
|
+
@include clearfix();
|
579
|
+
[class*="span"] {
|
580
|
+
@include input-block-level();
|
581
|
+
float: left;
|
582
|
+
margin-left: $gutterWidth;
|
583
|
+
*margin-left: $gutterWidth - (.5 / ($gridRowWidth/1px) * 100 * 1%);
|
584
|
+
}
|
585
|
+
[class*="span"]:first-child {
|
586
|
+
margin-left: 0;
|
587
|
+
}
|
588
|
+
|
589
|
+
// generate .spanX
|
590
|
+
@include gridFluidSpanX($gridColumns, $columnWidth, $gutterWidth);
|
591
|
+
}
|
592
|
+
}
|
593
|
+
@mixin gridFluidSpanX($cols, $columnWidth, $gutterWidth) {
|
594
|
+
@for $i from 1 through $cols {
|
595
|
+
.span#{$i} { @include gridFluidSpan($i, $columnWidth, $gutterWidth) };
|
596
|
+
}
|
597
|
+
}
|
598
|
+
@mixin gridFluidSpan($columns, $columnWidth, $gutterWidth) {
|
599
|
+
width: ($columnWidth * $columns) + ($gutterWidth * ($columns - 1));
|
600
|
+
*width: ($columnWidth * $columns) + ($gutterWidth * ($columns - 1)) - (.5 / ($gridRowWidth/1px) * 100 * 1%);
|
601
|
+
}
|
602
|
+
|
603
|
+
@mixin gridInput($columnWidth, $gutterWidth) {
|
604
|
+
input, textarea, .uneditable-input {
|
605
|
+
margin-left: 0; // override margin-left from core grid system
|
606
|
+
}
|
607
|
+
|
608
|
+
// generate .spanX
|
609
|
+
@include gridInputSpanX($gridColumns, $columnWidth, $gutterWidth);
|
610
|
+
}
|
611
|
+
@mixin gridInputSpanX($cols, $columnWidth, $gutterWidth) {
|
612
|
+
@for $i from 1 through $cols {
|
613
|
+
input.span#{$i}, textarea.span#{$i}, .uneditable-input.span#{$i} { @include gridInputSpan($i, $columnWidth, $gutterWidth); }
|
614
|
+
}
|
615
|
+
}
|
616
|
+
@mixin gridInputSpan($columns, $columnWidth, $gutterWidth) {
|
617
|
+
width: (($columnWidth) * $columns) + ($gutterWidth * ($columns - 1)) - 10;
|
618
|
+
}
|
619
|
+
|
620
|
+
@mixin makeFluidColumn($columns, $columnWidth, $gutterWidth) {
|
621
|
+
// This isn't perfect, but it's better than nothing.
|
622
|
+
float: left;
|
623
|
+
margin-left: $gutterWidth;
|
624
|
+
@include gridFluidSpan($columns, $columnWidth, $gutterWidth);
|
625
|
+
}
|