wysia 0.0.2

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