flatstrap-sass 2.3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. data/LICENSE +14 -0
  2. data/README.md +52 -0
  3. data/lib/flatstrap-sass.rb +51 -0
  4. data/lib/flatstrap-sass/compass_functions.rb +19 -0
  5. data/lib/flatstrap-sass/engine.rb +7 -0
  6. data/lib/flatstrap-sass/sass_functions.rb +14 -0
  7. data/templates/project/manifest.rb +13 -0
  8. data/templates/project/styles.scss +5 -0
  9. data/vendor/assets/javascripts/application.js +154 -0
  10. data/vendor/assets/javascripts/bootstrap-affix.js +117 -0
  11. data/vendor/assets/javascripts/bootstrap-alert.js +99 -0
  12. data/vendor/assets/javascripts/bootstrap-button.js +105 -0
  13. data/vendor/assets/javascripts/bootstrap-carousel.js +207 -0
  14. data/vendor/assets/javascripts/bootstrap-collapse.js +167 -0
  15. data/vendor/assets/javascripts/bootstrap-dropdown.js +165 -0
  16. data/vendor/assets/javascripts/bootstrap-modal.js +247 -0
  17. data/vendor/assets/javascripts/bootstrap-popover.js +114 -0
  18. data/vendor/assets/javascripts/bootstrap-scrollspy.js +162 -0
  19. data/vendor/assets/javascripts/bootstrap-tab.js +144 -0
  20. data/vendor/assets/javascripts/bootstrap-tooltip.js +361 -0
  21. data/vendor/assets/javascripts/bootstrap-transition.js +60 -0
  22. data/vendor/assets/javascripts/bootstrap-typeahead.js +335 -0
  23. data/vendor/assets/javascripts/bootstrap.js +2159 -0
  24. data/vendor/assets/javascripts/bootstrap.min.js +6 -0
  25. data/vendor/assets/javascripts/google-code-prettify/prettify.js +28 -0
  26. data/vendor/assets/javascripts/jquery.js +2 -0
  27. data/vendor/assets/stylesheets/flatstrap-responsive.scss +1 -0
  28. data/vendor/assets/stylesheets/flatstrap.scss +1 -0
  29. data/vendor/assets/stylesheets/flatstrap/_accordion.scss +33 -0
  30. data/vendor/assets/stylesheets/flatstrap/_alerts.scss +78 -0
  31. data/vendor/assets/stylesheets/flatstrap/_breadcrumbs.scss +23 -0
  32. data/vendor/assets/stylesheets/flatstrap/_button-groups.scss +211 -0
  33. data/vendor/assets/stylesheets/flatstrap/_buttons.scss +215 -0
  34. data/vendor/assets/stylesheets/flatstrap/_carousel.scss +156 -0
  35. data/vendor/assets/stylesheets/flatstrap/_close.scss +32 -0
  36. data/vendor/assets/stylesheets/flatstrap/_code.scss +59 -0
  37. data/vendor/assets/stylesheets/flatstrap/_component-animations.scss +22 -0
  38. data/vendor/assets/stylesheets/flatstrap/_dropdowns.scss +231 -0
  39. data/vendor/assets/stylesheets/flatstrap/_font-awesome.scss +534 -0
  40. data/vendor/assets/stylesheets/flatstrap/_forms.scss +646 -0
  41. data/vendor/assets/stylesheets/flatstrap/_grid.scss +21 -0
  42. data/vendor/assets/stylesheets/flatstrap/_hero-unit.scss +24 -0
  43. data/vendor/assets/stylesheets/flatstrap/_labels-badges.scss +79 -0
  44. data/vendor/assets/stylesheets/flatstrap/_layouts.scss +16 -0
  45. data/vendor/assets/stylesheets/flatstrap/_media.scss +55 -0
  46. data/vendor/assets/stylesheets/flatstrap/_mixins.scss +654 -0
  47. data/vendor/assets/stylesheets/flatstrap/_modals.scss +91 -0
  48. data/vendor/assets/stylesheets/flatstrap/_navbar.scss +481 -0
  49. data/vendor/assets/stylesheets/flatstrap/_navs.scss +388 -0
  50. data/vendor/assets/stylesheets/flatstrap/_pager.scss +42 -0
  51. data/vendor/assets/stylesheets/flatstrap/_pagination.scss +94 -0
  52. data/vendor/assets/stylesheets/flatstrap/_popovers.scss +130 -0
  53. data/vendor/assets/stylesheets/flatstrap/_progress-bars.scss +118 -0
  54. data/vendor/assets/stylesheets/flatstrap/_reset.scss +216 -0
  55. data/vendor/assets/stylesheets/flatstrap/_responsive-1200px-min.scss +28 -0
  56. data/vendor/assets/stylesheets/flatstrap/_responsive-767px-max.scss +193 -0
  57. data/vendor/assets/stylesheets/flatstrap/_responsive-768px-979px.scss +19 -0
  58. data/vendor/assets/stylesheets/flatstrap/_responsive-navbar.scss +184 -0
  59. data/vendor/assets/stylesheets/flatstrap/_responsive-utilities.scss +74 -0
  60. data/vendor/assets/stylesheets/flatstrap/_scaffolding.scss +42 -0
  61. data/vendor/assets/stylesheets/flatstrap/_tables.scss +183 -0
  62. data/vendor/assets/stylesheets/flatstrap/_thumbnails.scss +50 -0
  63. data/vendor/assets/stylesheets/flatstrap/_tooltip.scss +69 -0
  64. data/vendor/assets/stylesheets/flatstrap/_type.scss +247 -0
  65. data/vendor/assets/stylesheets/flatstrap/_utilities.scss +45 -0
  66. data/vendor/assets/stylesheets/flatstrap/_variables.scss +296 -0
  67. data/vendor/assets/stylesheets/flatstrap/_wells.scss +25 -0
  68. data/vendor/assets/stylesheets/flatstrap/bootstrap-responsive.scss +48 -0
  69. data/vendor/assets/stylesheets/flatstrap/bootstrap.scss +63 -0
  70. metadata +180 -0
@@ -0,0 +1,21 @@
1
+ //
2
+ // Grid system
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Fixed (940px)
7
+ @include grid-core($gridColumnWidth, $gridGutterWidth);
8
+
9
+ // Fluid (940px)
10
+ @include grid-fluid($fluidGridColumnWidth, $fluidGridGutterWidth);
11
+
12
+ // Reset utility classes due to specificity
13
+ [class*="span"].hide,
14
+ .row-fluid [class*="span"].hide {
15
+ display: none;
16
+ }
17
+
18
+ [class*="span"].pull-right,
19
+ .row-fluid [class*="span"].pull-right {
20
+ float: right;
21
+ }
@@ -0,0 +1,24 @@
1
+ //
2
+ // Hero unit
3
+ // --------------------------------------------------
4
+
5
+
6
+ .hero-unit {
7
+ padding: 60px;
8
+ margin-bottom: 30px;
9
+ font-size: 18px;
10
+ font-weight: 200;
11
+ line-height: $baseLineHeight * 1.5;
12
+ color: $heroUnitLeadColor;
13
+ background-color: $heroUnitBackground;
14
+ h1 {
15
+ margin-bottom: 0;
16
+ font-size: 60px;
17
+ line-height: 1;
18
+ color: $heroUnitHeadingColor;
19
+ letter-spacing: -1px;
20
+ }
21
+ li {
22
+ line-height: $baseLineHeight * 1.5; // Reset since we specify in type.scss
23
+ }
24
+ }
@@ -0,0 +1,79 @@
1
+ //
2
+ // Labels and badges
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Base classes
7
+ .label,
8
+ .badge {
9
+ display: inline-block;
10
+ padding: 2px 4px;
11
+ font-size: $baseFontSize * .846;
12
+ font-weight: bold;
13
+ line-height: 14px; // ensure proper line-height if floated
14
+ color: $white;
15
+ vertical-align: baseline;
16
+ white-space: nowrap;
17
+ text-shadow: 0 -1px 0 rgba(0,0,0,.25);
18
+ background-color: $grayLight;
19
+ }
20
+
21
+ .badge {
22
+ padding-left: 9px;
23
+ padding-right: 9px;
24
+ }
25
+
26
+ // Empty labels/badges collapse
27
+ .label,
28
+ .badge {
29
+ &:empty {
30
+ display: none;
31
+ }
32
+ }
33
+
34
+ // Hover/focus state, but only for links
35
+ a {
36
+ &.label:hover,
37
+ &.label:focus,
38
+ &.badge:hover,
39
+ &.badge:focus {
40
+ color: $white;
41
+ text-decoration: none;
42
+ cursor: pointer;
43
+ }
44
+ }
45
+
46
+ // Colors
47
+ // Only give background-color difference to links (and to simplify, we don't qualifty with `a` but [href] attribute)
48
+ @each $item in label, badge {
49
+ // Important (red)
50
+ .#{$item}-important { background-color: $errorText; }
51
+ .#{$item}-important[href] { background-color: darken($errorText, 10%); }
52
+ // Warnings (orange)
53
+ .#{$item}-warning { background-color: $orange; }
54
+ .#{$item}-warning[href] { background-color: darken($orange, 10%); }
55
+ // Success (green)
56
+ .#{$item}-success { background-color: $successText; }
57
+ .#{$item}-success[href] { background-color: darken($successText, 10%); }
58
+ // Info (turquoise)
59
+ .#{$item}-info { background-color: $infoText; }
60
+ .#{$item}-info[href] { background-color: darken($infoText, 10%); }
61
+ // Inverse (black)
62
+ .#{$item}-inverse { background-color: $grayDark; }
63
+ .#{$item}-inverse[href] { background-color: darken($grayDark, 10%); }
64
+ }
65
+
66
+ // Quick fix for labels/badges in buttons
67
+ .btn {
68
+ .label,
69
+ .badge {
70
+ position: relative;
71
+ top: -1px;
72
+ }
73
+ }
74
+ .btn-mini {
75
+ .label,
76
+ .badge {
77
+ top: 0;
78
+ }
79
+ }
@@ -0,0 +1,16 @@
1
+ //
2
+ // Layouts
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Container (centered, fixed-width layouts)
7
+ .container {
8
+ @include container-fixed();
9
+ }
10
+
11
+ // Fluid layouts (left aligned, with sidebar, min- & max-width content)
12
+ .container-fluid {
13
+ padding-right: $gridGutterWidth;
14
+ padding-left: $gridGutterWidth;
15
+ @include clearfix();
16
+ }
@@ -0,0 +1,55 @@
1
+ // Media objects
2
+ // Source: http://stubbornella.org/content/?p=497
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Common styles
7
+ // -------------------------
8
+
9
+ // Clear the floats
10
+ .media,
11
+ .media-body {
12
+ overflow: hidden;
13
+ *overflow: visible;
14
+ zoom: 1;
15
+ }
16
+
17
+ // Proper spacing between instances of .media
18
+ .media,
19
+ .media .media {
20
+ margin-top: 15px;
21
+ }
22
+ .media:first-child {
23
+ margin-top: 0;
24
+ }
25
+
26
+ // For images and videos, set to block
27
+ .media-object {
28
+ display: block;
29
+ }
30
+
31
+ // Reset margins on headings for tighter default spacing
32
+ .media-heading {
33
+ margin: 0 0 5px;
34
+ }
35
+
36
+
37
+ // Media image alignment
38
+ // -------------------------
39
+
40
+ .media > .pull-left {
41
+ margin-right: 10px;
42
+ }
43
+ .media > .pull-right {
44
+ margin-left: 10px;
45
+ }
46
+
47
+
48
+ // Media list variation
49
+ // -------------------------
50
+
51
+ // Undo default ul/ol styles
52
+ .media-list {
53
+ margin-left: 0;
54
+ list-style: none;
55
+ }
@@ -0,0 +1,654 @@
1
+ //
2
+ // Mixins
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
+ // Fixes Opera/contenteditable bug:
19
+ // http://nicolasgallagher.com/micro-clearfix-hack/#comment-36952
20
+ line-height: 0;
21
+ }
22
+ &:after {
23
+ clear: both;
24
+ }
25
+ }
26
+
27
+ // Webkit-style focus
28
+ // ------------------
29
+ @mixin tab-focus() {
30
+ // Default
31
+ outline: thin dotted #333;
32
+ // Webkit
33
+ outline: 5px auto -webkit-focus-ring-color;
34
+ outline-offset: -2px;
35
+ }
36
+
37
+ // Center-align a block level element
38
+ // ----------------------------------
39
+ @mixin center-block() {
40
+ display: block;
41
+ margin-left: auto;
42
+ margin-right: auto;
43
+ }
44
+
45
+ // IE7 inline-block
46
+ // ----------------
47
+ @mixin ie7-inline-block() {
48
+ *display: inline; /* IE7 inline-block hack */
49
+ *zoom: 1;
50
+ }
51
+
52
+ // IE7 likes to collapse whitespace on either side of the inline-block elements.
53
+ // Ems because we're attempting to match the width of a space character. Left
54
+ // version is for form buttons, which typically come after other elements, and
55
+ // right version is for icons, which come before. Applying both is ok, but it will
56
+ // mean that space between those elements will be .6em (~2 space characters) in IE7,
57
+ // instead of the 1 space in other browsers.
58
+ @mixin ie7-restore-left-whitespace() {
59
+ *margin-left: .3em;
60
+
61
+ &:first-child {
62
+ *margin-left: 0;
63
+ }
64
+ }
65
+
66
+ @mixin ie7-restore-right-whitespace() {
67
+ *margin-right: .3em;
68
+ }
69
+
70
+ // Sizing shortcuts
71
+ // -------------------------
72
+ @mixin size($height, $width) {
73
+ width: $width;
74
+ height: $height;
75
+ }
76
+ @mixin square($size) {
77
+ @include size($size, $size);
78
+ }
79
+
80
+ // Placeholder text
81
+ // -------------------------
82
+ @mixin placeholder($color: $placeholderText) {
83
+ &:-moz-placeholder {
84
+ color: $color;
85
+ }
86
+ &:-ms-input-placeholder {
87
+ color: $color;
88
+ }
89
+ &::-webkit-input-placeholder {
90
+ color: $color;
91
+ }
92
+ }
93
+
94
+ // Text overflow
95
+ // -------------------------
96
+ // Requires inline-block or block for proper styling
97
+ @mixin text-overflow() {
98
+ overflow: hidden;
99
+ text-overflow: ellipsis;
100
+ white-space: nowrap;
101
+ }
102
+
103
+ // CSS image replacement
104
+ // -------------------------
105
+ // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
106
+ @mixin hide-text {
107
+ font: 0/0 a;
108
+ color: transparent;
109
+ text-shadow: none;
110
+ background-color: transparent;
111
+ border: 0;
112
+ }
113
+
114
+
115
+ // FONTS
116
+ // --------------------------------------------------
117
+
118
+ @mixin font-family-serif() {
119
+ font-family: $serifFontFamily;
120
+ }
121
+ @mixin font-family-sans-serif() {
122
+ font-family: $sansFontFamily;
123
+ }
124
+ @mixin font-family-monospace() {
125
+ font-family: $monoFontFamily;
126
+ }
127
+ @mixin font-shorthand($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
128
+ font-size: $size;
129
+ font-weight: $weight;
130
+ line-height: $lineHeight;
131
+ }
132
+ @mixin font-serif($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
133
+ @include font-family-serif();
134
+ @include font-shorthand($size, $weight, $lineHeight);
135
+ }
136
+ @mixin font-sans-serif($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
137
+ @include font-family-sans-serif();
138
+ @include font-shorthand($size, $weight, $lineHeight);
139
+ }
140
+ @mixin font-monospace($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
141
+ @include font-family-monospace();
142
+ @include font-shorthand($size, $weight, $lineHeight);
143
+ }
144
+
145
+
146
+ // FORMS
147
+ // --------------------------------------------------
148
+
149
+ // Block level inputs
150
+ @mixin input-block-level {
151
+ display: block;
152
+ width: 100%;
153
+ min-height: $inputHeight; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
154
+ @include box-sizing(border-box); // Makes inputs behave like true block-level elements
155
+ }
156
+
157
+
158
+
159
+ // Mixin for form field states
160
+ @mixin formFieldState($textColor: #555, $borderColor: #ccc, $backgroundColor: #f5f5f5) {
161
+ // Set the text color
162
+ .control-label,
163
+ .help-block,
164
+ .help-inline {
165
+ color: $textColor;
166
+ }
167
+ // Style inputs accordingly
168
+ .checkbox,
169
+ .radio,
170
+ input,
171
+ select,
172
+ textarea {
173
+ color: $textColor;
174
+ }
175
+ input,
176
+ select,
177
+ textarea {
178
+ border-color: $borderColor;
179
+ @include box-shadow(none); // Redeclare so transitions work
180
+ &:focus {
181
+ border-color: darken($borderColor, 10%);
182
+ @include box-shadow(none);
183
+ }
184
+ }
185
+ // Give a small background color for input-prepend/-append
186
+ .input-prepend .add-on,
187
+ .input-append .add-on {
188
+ color: $textColor;
189
+ background-color: $backgroundColor;
190
+ border-color: $textColor;
191
+ }
192
+ }
193
+
194
+
195
+
196
+ // CSS3 PROPERTIES
197
+ // --------------------------------------------------
198
+
199
+ // Border Radius
200
+ @mixin border-radius($radius) {
201
+ -webkit-border-radius: $radius;
202
+ -moz-border-radius: $radius;
203
+ border-radius: $radius;
204
+ }
205
+
206
+ // Single Corner Border Radius
207
+ @mixin border-top-left-radius($radius) {
208
+ -webkit-border-top-left-radius: $radius;
209
+ -moz-border-radius-topleft: $radius;
210
+ border-top-left-radius: $radius;
211
+ }
212
+ @mixin border-top-right-radius($radius) {
213
+ -webkit-border-top-right-radius: $radius;
214
+ -moz-border-radius-topright: $radius;
215
+ border-top-right-radius: $radius;
216
+ }
217
+ @mixin border-bottom-right-radius($radius) {
218
+ -webkit-border-bottom-right-radius: $radius;
219
+ -moz-border-radius-bottomright: $radius;
220
+ border-bottom-right-radius: $radius;
221
+ }
222
+ @mixin border-bottom-left-radius($radius) {
223
+ -webkit-border-bottom-left-radius: $radius;
224
+ -moz-border-radius-bottomleft: $radius;
225
+ border-bottom-left-radius: $radius;
226
+ }
227
+
228
+ // Single Side Border Radius
229
+ @mixin border-top-radius($radius) {
230
+ @include border-top-right-radius($radius);
231
+ @include border-top-left-radius($radius);
232
+ }
233
+ @mixin border-right-radius($radius) {
234
+ @include border-top-right-radius($radius);
235
+ @include border-bottom-right-radius($radius);
236
+ }
237
+ @mixin border-bottom-radius($radius) {
238
+ @include border-bottom-right-radius($radius);
239
+ @include border-bottom-left-radius($radius);
240
+ }
241
+ @mixin border-left-radius($radius) {
242
+ @include border-top-left-radius($radius);
243
+ @include border-bottom-left-radius($radius);
244
+ }
245
+
246
+ // Drop shadows
247
+ @mixin box-shadow($shadow...) {
248
+ -webkit-box-shadow: $shadow;
249
+ -moz-box-shadow: $shadow;
250
+ box-shadow: $shadow;
251
+ }
252
+
253
+ // Transitions
254
+ @mixin transition($transition...) {
255
+ -webkit-transition: $transition;
256
+ -moz-transition: $transition;
257
+ -o-transition: $transition;
258
+ transition: $transition;
259
+ }
260
+ @mixin transition-delay($transition-delay) {
261
+ -webkit-transition-delay: $transition-delay;
262
+ -moz-transition-delay: $transition-delay;
263
+ -o-transition-delay: $transition-delay;
264
+ transition-delay: $transition-delay;
265
+ }
266
+ @mixin transition-duration($transition-duration) {
267
+ -webkit-transition-duration: $transition-duration;
268
+ -moz-transition-duration: $transition-duration;
269
+ -o-transition-duration: $transition-duration;
270
+ transition-duration: $transition-duration;
271
+ }
272
+
273
+ // Transformations
274
+ @mixin rotate($degrees) {
275
+ -webkit-transform: rotate($degrees);
276
+ -moz-transform: rotate($degrees);
277
+ -ms-transform: rotate($degrees);
278
+ -o-transform: rotate($degrees);
279
+ transform: rotate($degrees);
280
+ }
281
+ @mixin scale($ratio) {
282
+ -webkit-transform: scale($ratio);
283
+ -moz-transform: scale($ratio);
284
+ -ms-transform: scale($ratio);
285
+ -o-transform: scale($ratio);
286
+ transform: scale($ratio);
287
+ }
288
+ @mixin translate($x, $y) {
289
+ -webkit-transform: translate($x, $y);
290
+ -moz-transform: translate($x, $y);
291
+ -ms-transform: translate($x, $y);
292
+ -o-transform: translate($x, $y);
293
+ transform: translate($x, $y);
294
+ }
295
+ @mixin skew($x, $y) {
296
+ -webkit-transform: skew($x, $y);
297
+ -moz-transform: skew($x, $y);
298
+ -ms-transform: skewX($x) skewY($y); // See https://github.com/twitter/bootstrap/issues/4885
299
+ -o-transform: skew($x, $y);
300
+ transform: skew($x, $y);
301
+ -webkit-backface-visibility: hidden; // See https://github.com/twitter/bootstrap/issues/5319
302
+ }
303
+ @mixin translate3d($x, $y, $z) {
304
+ -webkit-transform: translate3d($x, $y, $z);
305
+ -moz-transform: translate3d($x, $y, $z);
306
+ -o-transform: translate3d($x, $y, $z);
307
+ transform: translate3d($x, $y, $z);
308
+ }
309
+
310
+ // Backface visibility
311
+ // Prevent browsers from flickering when using CSS 3D transforms.
312
+ // Default value is `visible`, but can be changed to `hidden
313
+ // See git pull https://github.com/dannykeane/bootstrap.git backface-visibility for examples
314
+ @mixin backface-visibility($visibility){
315
+ -webkit-backface-visibility: $visibility;
316
+ -moz-backface-visibility: $visibility;
317
+ backface-visibility: $visibility;
318
+ }
319
+
320
+ // Background clipping
321
+ // Heads up: FF 3.6 and under need "padding" instead of "padding-box"
322
+ @mixin background-clip($clip) {
323
+ -webkit-background-clip: $clip;
324
+ -moz-background-clip: $clip;
325
+ background-clip: $clip;
326
+ }
327
+
328
+ // Background sizing
329
+ @mixin background-size($size) {
330
+ -webkit-background-size: $size;
331
+ -moz-background-size: $size;
332
+ -o-background-size: $size;
333
+ background-size: $size;
334
+ }
335
+
336
+
337
+ // Box sizing
338
+ @mixin box-sizing($boxmodel) {
339
+ -webkit-box-sizing: $boxmodel;
340
+ -moz-box-sizing: $boxmodel;
341
+ box-sizing: $boxmodel;
342
+ }
343
+
344
+ // User select
345
+ // For selecting text on the page
346
+ @mixin user-select($select) {
347
+ -webkit-user-select: $select;
348
+ -moz-user-select: $select;
349
+ -ms-user-select: $select;
350
+ -o-user-select: $select;
351
+ user-select: $select;
352
+ }
353
+
354
+ // Resize anything
355
+ @mixin resizable($direction) {
356
+ resize: $direction; // Options: horizontal, vertical, both
357
+ overflow: auto; // Safari fix
358
+ }
359
+
360
+ // CSS3 Content Columns
361
+ @mixin content-columns($columnCount, $columnGap: $gridGutterWidth) {
362
+ -webkit-column-count: $columnCount;
363
+ -moz-column-count: $columnCount;
364
+ column-count: $columnCount;
365
+ -webkit-column-gap: $columnGap;
366
+ -moz-column-gap: $columnGap;
367
+ column-gap: $columnGap;
368
+ }
369
+
370
+ // Optional hyphenation
371
+ @mixin hyphens($mode: auto) {
372
+ word-wrap: break-word;
373
+ -webkit-hyphens: $mode;
374
+ -moz-hyphens: $mode;
375
+ -ms-hyphens: $mode;
376
+ -o-hyphens: $mode;
377
+ hyphens: $mode;
378
+ }
379
+
380
+ // Opacity
381
+ @mixin opacity($opacity) {
382
+ opacity: $opacity / 100;
383
+ filter: alpha(opacity=$opacity);
384
+ }
385
+
386
+
387
+
388
+ // BACKGROUNDS
389
+ // --------------------------------------------------
390
+
391
+ // Add an alphatransparency value to any background or border color (via Elyse Holladay)
392
+ @mixin translucent-background($color: $white, $alpha: 1) {
393
+ background-color: hsla(hue($color), saturation($color), lightness($color), $alpha);
394
+ }
395
+
396
+ @mixin translucent-border($color: $white, $alpha: 1) {
397
+ border-color: hsla(hue($color), saturation($color), lightness($color), $alpha);
398
+ @include background-clip(padding-box);
399
+ }
400
+
401
+ // Gradient Bar Colors for buttons and alerts
402
+ @mixin gradientBar($primaryColor, $secondaryColor, $textColor: #fff, $textShadow: 0 -1px 0 rgba(0,0,0,.25)) {
403
+ color: $textColor;
404
+ text-shadow: $textShadow;
405
+ @include gradient-vertical($primaryColor, $secondaryColor);
406
+ border-color: $secondaryColor $secondaryColor darken($secondaryColor, 15%);
407
+ border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fade-in(rgba(0,0,0,.1), 0.15);
408
+ }
409
+
410
+ // Gradients
411
+ @mixin gradient-horizontal($startColor: #555, $endColor: #333) {
412
+ background-color: $endColor;
413
+ }
414
+ @mixin gradient-vertical($startColor: #555, $endColor: #333) {
415
+ background-color: mix($startColor, $endColor, 60%);
416
+ }
417
+ @mixin gradient-directional($startColor: #555, $endColor: #333, $deg: 45deg) {
418
+ background-color: $endColor;
419
+ }
420
+ @mixin gradient-vertical-three-colors($startColor: #00b3ee, $midColor: #7a43b6, $colorStop: 50%, $endColor: #c3325f) {
421
+ background-color: mix($midColor, $endColor, 80%);
422
+ }
423
+ @mixin gradient-radial($innerColor: #555, $outerColor: #333) {
424
+ background-color: $outerColor;
425
+ }
426
+ @mixin gradient-striped($color: #555, $angle: 45deg) {
427
+ background-color: $color;
428
+ }
429
+
430
+ // Reset filters for IE
431
+ @mixin 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, $textColor: #fff, $textShadow: 0 -1px 0 rgba(0,0,0,.25)) {
460
+ // gradientBar will set the background to a pleasing blend of these, to support IE<=9
461
+ @include gradientBar($startColor, $endColor, $textColor, $textShadow);
462
+ *background-color: $endColor; /* Darken IE7 buttons by default so they stand out more given they won't have borders */
463
+ @include reset-filter();
464
+
465
+ // in these cases the gradient won't cover the background, so we override
466
+ &:hover, &:focus, &:active, &.active, &.disabled, &[disabled] {
467
+ color: $textColor;
468
+ background-color: $endColor;
469
+ *background-color: darken($endColor, 5%);
470
+ }
471
+
472
+ // IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves
473
+ &:active,
474
+ &.active {
475
+ background-color: darken($endColor, 10%) \9;
476
+ }
477
+ }
478
+
479
+ // Navbar vertical align
480
+ // -------------------------
481
+ // Vertically center elements in the navbar.
482
+ // Example: an element has a height of 30px, so write out `.navbarVerticalAlign(30px);` to calculate the appropriate top margin.
483
+ @mixin navbarVerticalAlign($elementHeight) {
484
+ margin-top: ($navbarHeight - $elementHeight) / 2;
485
+ }
486
+
487
+
488
+
489
+ // Grid System
490
+ // -----------
491
+
492
+ // Centered container element
493
+ @mixin container-fixed() {
494
+ margin-right: auto;
495
+ margin-left: auto;
496
+ @include clearfix();
497
+ }
498
+
499
+ // Table columns
500
+ @mixin tableColumns($columnSpan: 1) {
501
+ float: none; // undo default grid column styles
502
+ width: (($gridColumnWidth) * $columnSpan) + ($gridGutterWidth * ($columnSpan - 1)) - 16; // 16 is total padding on left and right of table cells
503
+ margin-left: 0; // undo default grid column styles
504
+ }
505
+
506
+ // Make a Grid
507
+ // Use .makeRow and .makeColumn to assign semantic layouts grid system behavior
508
+ @mixin makeRow() {
509
+ margin-left: $gridGutterWidth * -1;
510
+ @include clearfix();
511
+ }
512
+ @mixin makeColumn($columns: 1, $offset: 0) {
513
+ float: left;
514
+ margin-left: ($gridColumnWidth * $offset) + ($gridGutterWidth * ($offset - 1)) + ($gridGutterWidth * 2);
515
+ width: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns - 1));
516
+ }
517
+
518
+ // The Grid
519
+ @mixin grid-core($gridColumnWidth, $gridGutterWidth) {
520
+ .row {
521
+ margin-left: $gridGutterWidth * -1;
522
+ @include clearfix();
523
+ }
524
+
525
+ [class*="span"] {
526
+ float: left;
527
+ min-height: 1px; // prevent collapsing columns
528
+ margin-left: $gridGutterWidth;
529
+ }
530
+
531
+ // Set the container width, and override it for fixed navbars in media queries
532
+ .container,
533
+ .navbar-static-top .container,
534
+ .navbar-fixed-top .container,
535
+ .navbar-fixed-bottom .container {
536
+ @include grid-core-span($gridColumns, $gridColumnWidth, $gridGutterWidth);
537
+ }
538
+
539
+ // generate .spanX and .offsetX
540
+ @include grid-core-span-x($gridColumns, $gridColumnWidth, $gridGutterWidth);
541
+ @include grid-core-offset-x($gridColumns, $gridColumnWidth, $gridGutterWidth);
542
+ }
543
+
544
+ @mixin grid-core-span-x($gridColumns, $gridColumnWidth, $gridGutterWidth) {
545
+ @while $gridColumns > 0 {
546
+ .span#{$gridColumns} { @include grid-core-span($gridColumns, $gridColumnWidth, $gridGutterWidth)}
547
+ $gridColumns: $gridColumns - 1;
548
+ }
549
+ }
550
+
551
+ @mixin grid-core-offset-x($gridColumns, $gridColumnWidth, $gridGutterWidth) {
552
+ @while $gridColumns > 0 {
553
+ .offset#{$gridColumns} { @include grid-core-offset($gridColumns, $gridColumnWidth, $gridGutterWidth); }
554
+ $gridColumns: $gridColumns - 1;
555
+ }
556
+ }
557
+
558
+ @mixin grid-core-span($columns, $gridColumnWidth, $gridGutterWidth) {
559
+ width: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns - 1));
560
+ }
561
+
562
+ @mixin grid-core-offset($columns, $gridColumnWidth, $gridGutterWidth) {
563
+ margin-left: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns + 1));
564
+ }
565
+
566
+
567
+
568
+ @mixin grid-fluid($fluidGridColumnWidth, $fluidGridGutterWidth) {
569
+ .row-fluid {
570
+ width: 100%;
571
+ @include clearfix();
572
+ [class*="span"] {
573
+ @include input-block-level();
574
+ float: left;
575
+ margin-left: $fluidGridGutterWidth;
576
+ *margin-left: $fluidGridGutterWidth - (.5 / $gridRowWidth * 100px * 1%);
577
+ }
578
+ [class*="span"]:first-child {
579
+ margin-left: 0;
580
+ }
581
+
582
+ // Space grid-sized controls properly if multiple per line
583
+ .controls-row [class*="span"] + [class*="span"] {
584
+ margin-left: $fluidGridGutterWidth;
585
+ }
586
+
587
+ // generate .spanX and .offsetX
588
+ @include grid-fluid-span-x($gridColumns, $fluidGridColumnWidth, $fluidGridGutterWidth);
589
+ @include grid-fluid-offset-x($gridColumns, $fluidGridColumnWidth, $fluidGridGutterWidth);
590
+ }
591
+ }
592
+
593
+ @mixin grid-fluid-span-x($gridColumns, $fluidGridColumnWidth, $fluidGridGutterWidth) {
594
+ @while $gridColumns > 0 {
595
+ .span#{$gridColumns} { @include grid-fluid-span($gridColumns, $fluidGridColumnWidth, $fluidGridGutterWidth); }
596
+ $gridColumns: $gridColumns - 1;
597
+ }
598
+ }
599
+
600
+ @mixin grid-fluid-offset-x($gridColumns, $fluidGridColumnWidth, $fluidGridGutterWidth) {
601
+ @while $gridColumns > 0 {
602
+ .offset#{$gridColumns} { @include grid-fluid-offset($gridColumns, $fluidGridColumnWidth, $fluidGridGutterWidth); }
603
+ .offset#{$gridColumns}:first-child { @include grid-fluid-offset-first-child($gridColumns, $fluidGridColumnWidth, $fluidGridGutterWidth); }
604
+ $gridColumns: $gridColumns - 1;
605
+ }
606
+ }
607
+
608
+ @mixin grid-fluid-span($columns, $fluidGridColumnWidth, $fluidGridGutterWidth) {
609
+ width: ($fluidGridColumnWidth * $columns) + ($fluidGridGutterWidth * ($columns - 1));
610
+ *width: ($fluidGridColumnWidth * $columns) + ($fluidGridGutterWidth * ($columns - 1)) - (.5 / $gridRowWidth * 100px * 1%);
611
+ }
612
+
613
+ @mixin grid-fluid-offset($columns, $fluidGridColumnWidth, $fluidGridGutterWidth) {
614
+ margin-left: ($fluidGridColumnWidth * $columns) + ($fluidGridGutterWidth * ($columns - 1)) + ($fluidGridGutterWidth * 2);
615
+ *margin-left: ($fluidGridColumnWidth * $columns) + ($fluidGridGutterWidth * ($columns - 1)) - (.5 / $gridRowWidth * 100px * 1%) + ($fluidGridGutterWidth * 2) - (.5 / $gridRowWidth * 100px * 1%);
616
+ }
617
+
618
+ @mixin grid-fluid-offset-first-child($columns, $fluidGridColumnWidth, $fluidGridGutterWidth) {
619
+ margin-left: ($fluidGridColumnWidth * $columns) + ($fluidGridGutterWidth * ($columns - 1)) + ($fluidGridGutterWidth);
620
+ *margin-left: ($fluidGridColumnWidth * $columns) + ($fluidGridGutterWidth * ($columns - 1)) - (.5 / $gridRowWidth * 100px * 1%) + $fluidGridGutterWidth - (.5 / $gridRowWidth * 100px * 1%);
621
+ }
622
+
623
+
624
+
625
+ @mixin grid-input($gridColumnWidth, $gridGutterWidth) {
626
+ input,
627
+ textarea,
628
+ .uneditable-input {
629
+ margin-left: 0; // override margin-left from core grid system
630
+ }
631
+
632
+ // Space grid-sized controls properly if multiple per line
633
+ .controls-row [class*="span"] + [class*="span"] {
634
+ margin-left: $gridGutterWidth;
635
+ }
636
+
637
+ // generate .spanX
638
+ @include grid-input-span-x($gridColumns, $gridColumnWidth, $gridGutterWidth);
639
+ }
640
+
641
+ @mixin grid-input-span-x($gridColumns, $gridColumnWidth, $gridGutterWidth) {
642
+ @while $gridColumns > 0 {
643
+ input.span#{$gridColumns},
644
+ textarea.span#{$gridColumns},
645
+ .uneditable-input.span#{$gridColumns} {
646
+ @include grid-input-span($gridColumns, $gridColumnWidth, $gridGutterWidth);
647
+ }
648
+ $gridColumns: $gridColumns - 1;
649
+ }
650
+ }
651
+
652
+ @mixin grid-input-span($columns, $gridColumnWidth, $gridGutterWidth) {
653
+ width: (($gridColumnWidth) * $columns) + ($gridGutterWidth * ($columns - 1)) - 14;
654
+ }