compass_twitter_bootstrap 0.1.8 → 2.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.
Files changed (96) hide show
  1. data/CHANGELOG.md +6 -0
  2. data/README.md +14 -8
  3. data/build/convert.rb +58 -33
  4. data/lib/compass_twitter_bootstrap.rb +1 -1
  5. data/lib/compass_twitter_bootstrap/version.rb +1 -1
  6. data/stylesheets/_compass_twitter_bootstrap.scss +45 -7
  7. data/stylesheets/_compass_twitter_bootstrap_responsive.scss +322 -0
  8. data/stylesheets/compass_twitter_bootstrap/_accordion.scss +28 -0
  9. data/stylesheets/compass_twitter_bootstrap/_alerts.scss +70 -0
  10. data/stylesheets/compass_twitter_bootstrap/_breadcrumbs.scss +22 -0
  11. data/stylesheets/compass_twitter_bootstrap/_button-groups.scss +147 -0
  12. data/stylesheets/compass_twitter_bootstrap/_buttons.scss +165 -0
  13. data/stylesheets/compass_twitter_bootstrap/_carousel.scss +121 -0
  14. data/stylesheets/compass_twitter_bootstrap/_close.scss +18 -0
  15. data/stylesheets/compass_twitter_bootstrap/_code.scss +44 -0
  16. data/stylesheets/compass_twitter_bootstrap/_component-animations.scss +18 -0
  17. data/stylesheets/compass_twitter_bootstrap/_dropdowns.scss +131 -0
  18. data/stylesheets/compass_twitter_bootstrap/_forms.scss +335 -299
  19. data/stylesheets/compass_twitter_bootstrap/_grid.scss +8 -0
  20. data/stylesheets/compass_twitter_bootstrap/_hero-unit.scss +20 -0
  21. data/stylesheets/compass_twitter_bootstrap/_labels.scss +16 -0
  22. data/stylesheets/compass_twitter_bootstrap/_layouts.scss +17 -0
  23. data/stylesheets/compass_twitter_bootstrap/_mixins.scss +409 -68
  24. data/stylesheets/compass_twitter_bootstrap/_modals.scss +72 -0
  25. data/stylesheets/compass_twitter_bootstrap/_navbar.scss +292 -0
  26. data/stylesheets/compass_twitter_bootstrap/_navs.scss +344 -0
  27. data/stylesheets/compass_twitter_bootstrap/_pager.scss +30 -0
  28. data/stylesheets/compass_twitter_bootstrap/_pagination.scss +55 -0
  29. data/stylesheets/compass_twitter_bootstrap/_popovers.scss +49 -0
  30. data/stylesheets/compass_twitter_bootstrap/_progress-bars.scss +95 -0
  31. data/stylesheets/compass_twitter_bootstrap/_reset.scss +37 -52
  32. data/stylesheets/compass_twitter_bootstrap/_scaffolding.scss +13 -123
  33. data/stylesheets/compass_twitter_bootstrap/_sprites.scss +156 -0
  34. data/stylesheets/compass_twitter_bootstrap/_tables.scss +75 -160
  35. data/stylesheets/compass_twitter_bootstrap/_thumbnails.scss +35 -0
  36. data/stylesheets/compass_twitter_bootstrap/_tooltip.scss +35 -0
  37. data/stylesheets/compass_twitter_bootstrap/_type.scss +100 -70
  38. data/stylesheets/compass_twitter_bootstrap/_utilities.scss +23 -0
  39. data/stylesheets/compass_twitter_bootstrap/_variables.scss +94 -55
  40. data/stylesheets/compass_twitter_bootstrap/_wells.scss +17 -0
  41. data/stylesheets_sass/_compass_twitter_bootstrap.sass +49 -6
  42. data/stylesheets_sass/_compass_twitter_bootstrap_responsive.sass +252 -0
  43. data/stylesheets_sass/compass_twitter_bootstrap/_accordion.sass +24 -0
  44. data/stylesheets_sass/compass_twitter_bootstrap/_alerts.sass +65 -0
  45. data/stylesheets_sass/compass_twitter_bootstrap/_breadcrumbs.sass +18 -0
  46. data/stylesheets_sass/compass_twitter_bootstrap/_button-groups.sass +129 -0
  47. data/stylesheets_sass/compass_twitter_bootstrap/_buttons.sass +150 -0
  48. data/stylesheets_sass/compass_twitter_bootstrap/_carousel.sass +95 -0
  49. data/stylesheets_sass/compass_twitter_bootstrap/_close.sass +16 -0
  50. data/stylesheets_sass/compass_twitter_bootstrap/_code.sass +41 -0
  51. data/stylesheets_sass/compass_twitter_bootstrap/_component-animations.sass +16 -0
  52. data/stylesheets_sass/compass_twitter_bootstrap/_dropdowns.sass +121 -0
  53. data/stylesheets_sass/compass_twitter_bootstrap/_forms.sass +327 -306
  54. data/stylesheets_sass/compass_twitter_bootstrap/_grid.sass +8 -0
  55. data/stylesheets_sass/compass_twitter_bootstrap/_hero-unit.sass +17 -0
  56. data/stylesheets_sass/compass_twitter_bootstrap/_labels.sass +23 -0
  57. data/stylesheets_sass/compass_twitter_bootstrap/_layouts.sass +14 -0
  58. data/stylesheets_sass/compass_twitter_bootstrap/_mixins.sass +425 -57
  59. data/stylesheets_sass/compass_twitter_bootstrap/_modals.sass +75 -0
  60. data/stylesheets_sass/compass_twitter_bootstrap/_navbar.sass +258 -0
  61. data/stylesheets_sass/compass_twitter_bootstrap/_navs.sass +316 -0
  62. data/stylesheets_sass/compass_twitter_bootstrap/_pager.sass +29 -0
  63. data/stylesheets_sass/compass_twitter_bootstrap/_pagination.sass +53 -0
  64. data/stylesheets_sass/compass_twitter_bootstrap/_popovers.sass +55 -0
  65. data/stylesheets_sass/compass_twitter_bootstrap/_progress-bars.sass +89 -0
  66. data/stylesheets_sass/compass_twitter_bootstrap/_reset.sass +33 -67
  67. data/stylesheets_sass/compass_twitter_bootstrap/_scaffolding.sass +13 -175
  68. data/stylesheets_sass/compass_twitter_bootstrap/_sprites.sass +392 -0
  69. data/stylesheets_sass/compass_twitter_bootstrap/_tables.sass +67 -139
  70. data/stylesheets_sass/compass_twitter_bootstrap/_thumbnails.sass +34 -0
  71. data/stylesheets_sass/compass_twitter_bootstrap/_tooltip.sass +43 -0
  72. data/stylesheets_sass/compass_twitter_bootstrap/_type.sass +95 -65
  73. data/stylesheets_sass/compass_twitter_bootstrap/_utilities.sass +20 -0
  74. data/stylesheets_sass/compass_twitter_bootstrap/_variables.sass +67 -45
  75. data/stylesheets_sass/compass_twitter_bootstrap/_wells.sass +15 -0
  76. data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
  77. data/vendor/assets/images/glyphicons-halflings.png +0 -0
  78. data/vendor/assets/javascripts/bootstrap-alert.js +91 -0
  79. data/vendor/assets/javascripts/bootstrap-button.js +98 -0
  80. data/vendor/assets/javascripts/bootstrap-carousel.js +154 -0
  81. data/vendor/assets/javascripts/bootstrap-collapse.js +136 -0
  82. data/vendor/assets/javascripts/bootstrap-dropdown.js +58 -21
  83. data/vendor/assets/javascripts/bootstrap-modal.js +63 -114
  84. data/vendor/assets/javascripts/bootstrap-popover.js +38 -33
  85. data/vendor/assets/javascripts/bootstrap-scrollspy.js +62 -44
  86. data/vendor/assets/javascripts/bootstrap-tab.js +130 -0
  87. data/vendor/assets/javascripts/bootstrap-tooltip.js +270 -0
  88. data/vendor/assets/javascripts/bootstrap-transition.js +51 -0
  89. data/vendor/assets/javascripts/bootstrap-typeahead.js +271 -0
  90. metadata +69 -17
  91. data/stylesheets/compass_twitter_bootstrap/_patterns.scss +0 -1058
  92. data/stylesheets_sass/compass_twitter_bootstrap/_patterns.sass +0 -923
  93. data/vendor/assets/javascripts/bootstrap-alerts.js +0 -124
  94. data/vendor/assets/javascripts/bootstrap-buttons.js +0 -64
  95. data/vendor/assets/javascripts/bootstrap-tabs.js +0 -80
  96. data/vendor/assets/javascripts/bootstrap-twipsy.js +0 -321
@@ -0,0 +1,8 @@
1
+ // GRID SYSTEM
2
+ // -----------
3
+
4
+ // Fixed (940px)
5
+ @include gridSystem-generate($gridColumns, $gridColumnWidth, $gridGutterWidth);
6
+
7
+ // Fluid (940px)
8
+ @include fluidGridSystem-generate($gridColumns, $fluidGridColumnWidth, $fluidGridGutterWidth);
@@ -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,17 @@
1
+ //
2
+ // Layouts
3
+ // Fixed-width and fluid (with sidebar) layouts
4
+ // --------------------------------------------
5
+
6
+
7
+ // Container (centered, fixed-width layouts)
8
+ .container {
9
+ @include container-fixed();
10
+ }
11
+
12
+ // Fluid layouts (left aligned, with sidebar, min- & max-width content)
13
+ .container-fluid {
14
+ padding-left: $gridGutterWidth;
15
+ padding-right: $gridGutterWidth;
16
+ @include clearfix();
17
+ }
@@ -1,40 +1,86 @@
1
- /* Mixins.scss
2
- * Snippets of reusable CSS to develop faster and keep code readable
3
- * ----------------------------------------------------------------- */
1
+ // Mixins.less
2
+ // Snippets of reusable CSS to develop faster and keep code readable
3
+ // -----------------------------------------------------------------
4
4
 
5
5
 
6
- // Clearfix for clearing floats like a boss h5bp.com/q
7
- @mixin clearfix {
8
- zoom: 1;
6
+ // UTILITY MIXINS
7
+ // --------------------------------------------------
8
+
9
+ // Clearfix
10
+ // --------
11
+ // For clearing floats like a boss h5bp.com/q
12
+ @mixin clearfix() {
13
+ *zoom: 1;
9
14
  &:before,
10
15
  &:after {
11
16
  display: table;
12
17
  content: "";
13
- zoom: 1;
14
18
  }
15
19
  &:after {
16
20
  clear: both;
17
21
  }
18
22
  }
19
23
 
24
+ // Webkit-style focus
25
+ // ------------------
26
+ @mixin tab-focus() {
27
+ // Default
28
+ outline: thin dotted;
29
+ // Webkit
30
+ outline: 5px auto -webkit-focus-ring-color;
31
+ outline-offset: -2px;
32
+ }
33
+
20
34
  // Center-align a block level element
21
- @mixin center-block {
35
+ // ----------------------------------
36
+ @mixin center-block() {
22
37
  display: block;
23
38
  margin-left: auto;
24
39
  margin-right: auto;
25
40
  }
26
41
 
42
+ // IE7 inline-block
43
+ // ----------------
44
+ @mixin ie7-inline-block() {
45
+ *display: inline; /* IE7 inline-block hack */
46
+ *zoom: 1;
47
+ }
48
+
49
+ // IE7 likes to collapse whitespace on either side of the inline-block elements.
50
+ // Ems because we're attempting to match the width of a space character. Left
51
+ // version is for form buttons, which typically come after other elements, and
52
+ // right version is for icons, which come before. Applying both is ok, but it will
53
+ // mean that space between those elements will be .6em (~2 space characters) in IE7,
54
+ // instead of the 1 space in other browsers.
55
+ @mixin ie7-restore-left-whitespace() {
56
+ *margin-left: .3em;
57
+
58
+ &:first-child {
59
+ *margin-left: 0;
60
+ }
61
+ }
62
+
63
+ @mixin ie7-restore-right-whitespace() {
64
+ *margin-right: .3em;
65
+
66
+ &:last-child {
67
+ *margin-left: 0;
68
+ }
69
+ }
70
+
27
71
  // Sizing shortcuts
72
+ // -------------------------
28
73
  @mixin size($height: 5px, $width: 5px) {
29
- height: $height;
30
74
  width: $width;
75
+ height: $height;
31
76
  }
32
77
  @mixin square($size: 5px) {
33
78
  @include size($size, $size);
34
79
  }
35
80
 
36
- // Input placeholder text
37
- @mixin placeholder($color: $grayLight) {
81
+ // Placeholder text
82
+ // -------------------------
83
+ @mixin placeholder($color: $placeholderText) {
38
84
  :-moz-placeholder {
39
85
  color: $color;
40
86
  }
@@ -43,66 +89,193 @@
43
89
  }
44
90
  }
45
91
 
46
- // Font Stacks
47
- @mixin shorthand($weight: normal, $size: 14px, $lineHeight: 20px) {
48
- font-size: $size;
49
- font-weight: $weight;
50
- line-height: $lineHeight;
92
+
93
+
94
+ // FONTS
95
+ // --------------------------------------------------
96
+ @mixin font-family-serif {
97
+ font-family: Georgia, "Times New Roman", Times, serif;
51
98
  }
52
99
 
53
- @mixin sans-serif($weight: normal, $size: 14px, $lineHeight: 20px) {
100
+ @mixin font-family-sans-serif {
54
101
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
55
- font-size: $size;
56
- font-weight: $weight;
57
- line-height: $lineHeight;
58
102
  }
59
103
 
60
- @mixin serif($weight: normal, $size: 14px, $lineHeight: 20px) {
61
- font-family: "Georgia", Times New Roman, Times, serif;
62
- font-size: $size;
63
- font-weight: $weight;
64
- line-height: $lineHeight;
104
+ @mixin font-family-monospace {
105
+ font-family: Menlo, Monaco, "Courier New", monospace;
65
106
  }
66
107
 
67
- @mixin monospace($weight: normal, $size: 12px, $lineHeight: 20px) {
68
- font-family: "Monaco", Courier New, monospace;
108
+ @mixin font-serif($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
109
+ font-family: Georgia, "Times New Roman", Times, serif;
110
+ @include shorthand($size, $weight, $lineHeight);
111
+ }
112
+
113
+ @mixin font-shorthand($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
69
114
  font-size: $size;
70
115
  font-weight: $weight;
71
116
  line-height: $lineHeight;
72
117
  }
73
118
 
74
- // Grid System
75
- @mixin fixed-container() {
76
- width: $siteWidth;
119
+ @mixin font-serif($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
120
+ @include font-family-serif();
121
+ @include font-shorthand($size, $weight, $lineHeight);
122
+ }
123
+
124
+ @mixin font-sans-serif($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
125
+ @include font-family-sans-serif();
126
+ @include font-shorthand($size, $weight, $lineHeight);
127
+ }
128
+
129
+ @mixin font-monospace($size: $baseFontSize, $weight: normal, $lineHeight: $baseLineHeight) {
130
+ @include font-family-monospace();
131
+ @include font-shorthand($size, $weight, $lineHeight);
132
+ }
133
+
134
+
135
+ // GRID SYSTEM
136
+ // --------------------------------------------------
137
+
138
+ // Site container
139
+ // -------------------------
140
+ @mixin container-fixed() {
141
+ width: $gridRowWidth;
77
142
  margin-left: auto;
78
143
  margin-right: auto;
79
144
  @include clearfix();
80
145
  }
81
146
 
82
- @mixin columns($columnSpan: 1) {
83
- width: ($gridColumnWidth * $columnSpan) + ($gridGutterWidth * ($columnSpan - 1));
84
- }
147
+ // Le grid system
148
+ @mixin gridSystem-columns ($gridGutterWidth, $gridColumnWidth, $gridRowWidth, $columns) {
149
+ width: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns - 1));
150
+ }
85
151
 
86
- @mixin offset($columnOffset: 1) {
87
- margin-left: ($gridColumnWidth * $columnOffset) + ($gridGutterWidth * ($columnOffset - 1)) + $extraSpace;
152
+ @mixin gridSystem-offset($gridColumnWidth, $gridGutterWidth, $columns) {
153
+ margin-left: ($gridColumnWidth * $columns) + ($gridGutterWidth * ($columns - 1)) + ($gridGutterWidth * 2);
88
154
  }
89
155
 
90
- // Necessary grid styles for every column to make them appear next to each other horizontally
91
- @mixin gridColumn() {
92
- display: inline;
156
+ @mixin gridSystem-gridColumn($gridGutterWidth) {
93
157
  float: left;
94
158
  margin-left: $gridGutterWidth;
95
159
  }
96
160
 
97
- // makeColumn can be used to mark any element (e.g., .content-primary) as a column without changing markup to .span something
98
- @mixin makeColumn($columnSpan: 1) {
99
- @include gridColumn();
100
- @include columns($columnSpan);
161
+ // Take these values and mixins, and make 'em do their thang
162
+ @mixin gridSystem-generate($gridColumns, $gridColumnWidth, $gridGutterWidth) {
163
+ // Row surrounds the columns
164
+ .row {
165
+ margin-left: $gridGutterWidth * -1;
166
+ @include clearfix();
167
+ }
168
+ // Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7, thanks $dhg)
169
+ [class*="span"] {
170
+ @include gridSystem-gridColumn($gridGutterWidth);
171
+ }
172
+ // Default columns
173
+ .span1 { @include gridSystem-columns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 1); }
174
+ .span2 { @include gridSystem-columns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 2); }
175
+ .span3 { @include gridSystem-columns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 3); }
176
+ .span4 { @include gridSystem-columns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 4); }
177
+ .span5 { @include gridSystem-columns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 5); }
178
+ .span6 { @include gridSystem-columns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 6); }
179
+ .span7 { @include gridSystem-columns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 7); }
180
+ .span8 { @include gridSystem-columns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 8); }
181
+ .span9 { @include gridSystem-columns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 9); }
182
+ .span10 { @include gridSystem-columns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 10); }
183
+ .span11 { @include gridSystem-columns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 11); }
184
+ .span12,
185
+ .container { @include gridSystem-columns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 12); }
186
+ // Offset column options
187
+ .offset1 { @include gridSystem-offset($gridColumnWidth, $gridGutterWidth, 1); }
188
+ .offset2 { @include gridSystem-offset($gridColumnWidth, $gridGutterWidth, 2); }
189
+ .offset3 { @include gridSystem-offset($gridColumnWidth, $gridGutterWidth, 3); }
190
+ .offset4 { @include gridSystem-offset($gridColumnWidth, $gridGutterWidth, 4); }
191
+ .offset5 { @include gridSystem-offset($gridColumnWidth, $gridGutterWidth, 5); }
192
+ .offset6 { @include gridSystem-offset($gridColumnWidth, $gridGutterWidth, 6); }
193
+ .offset7 { @include gridSystem-offset($gridColumnWidth, $gridGutterWidth, 7); }
194
+ .offset8 { @include gridSystem-offset($gridColumnWidth, $gridGutterWidth, 8); }
195
+ .offset9 { @include gridSystem-offset($gridColumnWidth, $gridGutterWidth, 9); }
196
+ .offset10 { @include gridSystem-offset($gridColumnWidth, $gridGutterWidth, 10); }
197
+ .offset11 { @include gridSystem-offset($gridColumnWidth, $gridGutterWidth, 11); }
198
+ }
199
+
200
+ // Fluid grid system
201
+ // -------------------------
202
+ @mixin fluidGridSystem-columns($fluidGridGutterWidth, $fluidGridColumnWidth, $columns) {
203
+ width: ($fluidGridColumnWidth * $columns) + ($fluidGridGutterWidth * ($columns - 1));
204
+ }
205
+
206
+ @mixin fluidGridSystem-gridColumn($fluidGridGutterWidth) {
207
+ float: left;
208
+ margin-left: $fluidGridGutterWidth;
209
+ }
210
+
211
+ // Take these values and mixins, and make 'em do their thang
212
+ @mixin fluidGridSystem-generate($gridColumns, $fluidGridColumnWidth, $fluidGridGutterWidth) {
213
+ // Row surrounds the columns
214
+ .row-fluid {
215
+ width: 100%;
216
+ @include clearfix();
217
+
218
+ // Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7, thanks $dhg)
219
+ > [class*="span"] {
220
+ @include fluidGridSystem-gridColumn($fluidGridGutterWidth);
221
+ }
222
+ > [class*="span"]:first-child {
223
+ margin-left: 0;
224
+ }
225
+ // Default columns
226
+ .span1 { @include fluidGridSystem-columns($fluidGridGutterWidth, $fluidGridColumnWidth, 1); }
227
+ .span2 { @include fluidGridSystem-columns($fluidGridGutterWidth, $fluidGridColumnWidth, 2); }
228
+ .span3 { @include fluidGridSystem-columns($fluidGridGutterWidth, $fluidGridColumnWidth, 3); }
229
+ .span4 { @include fluidGridSystem-columns($fluidGridGutterWidth, $fluidGridColumnWidth, 4); }
230
+ .span5 { @include fluidGridSystem-columns($fluidGridGutterWidth, $fluidGridColumnWidth, 5); }
231
+ .span6 { @include fluidGridSystem-columns($fluidGridGutterWidth, $fluidGridColumnWidth, 6); }
232
+ .span7 { @include fluidGridSystem-columns($fluidGridGutterWidth, $fluidGridColumnWidth, 7); }
233
+ .span8 { @include fluidGridSystem-columns($fluidGridGutterWidth, $fluidGridColumnWidth, 8); }
234
+ .span9 { @include fluidGridSystem-columns($fluidGridGutterWidth, $fluidGridColumnWidth, 9); }
235
+ .span10 { @include fluidGridSystem-columns($fluidGridGutterWidth, $fluidGridColumnWidth, 10); }
236
+ .span11 { @include fluidGridSystem-columns($fluidGridGutterWidth, $fluidGridColumnWidth, 11); }
237
+ .span12 { @include fluidGridSystem-columns($fluidGridGutterWidth, $fluidGridColumnWidth, 12); }
238
+ }
239
+ }
240
+
241
+
242
+
243
+ // Input grid system
244
+ // -------------------------
245
+ @mixin inputGridSystem-inputColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, $columns) {
246
+ width: (($gridColumnWidth) * $columns) + ($gridGutterWidth * ($columns - 1)) - 10;
247
+ }
248
+
249
+ @mixin inputGridSystem-generate($gridColumns, $gridColumnWidth, $gridGutterWidth) {
250
+ input,
251
+ textarea,
252
+ .uneditable-input {
253
+ &.span1 { @include inputGridSystem-inputColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 1); }
254
+ &.span2 { @include inputGridSystem-inputColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 2); }
255
+ &.span3 { @include inputGridSystem-inputColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 3); }
256
+ &.span4 { @include inputGridSystem-inputColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 4); }
257
+ &.span5 { @include inputGridSystem-inputColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 5); }
258
+ &.span6 { @include inputGridSystem-inputColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 6); }
259
+ &.span7 { @include inputGridSystem-inputColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 7); }
260
+ &.span8 { @include inputGridSystem-inputColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 8); }
261
+ &.span9 { @include inputGridSystem-inputColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 9); }
262
+ &.span10 { @include inputGridSystem-inputColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 10); }
263
+ &.span11 { @include inputGridSystem-inputColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 11); }
264
+ &.span12 { @include inputGridSystem-inputColumns($gridGutterWidth, $gridColumnWidth, $gridRowWidth, 12); }
265
+ }
101
266
  }
102
267
 
103
- // Border Radius (Will use compass version)
104
268
 
105
- // Drop shadows (Will use compass version)
269
+ // CSS3 PROPERTIES
270
+ // --------------------------------------------------
271
+
272
+
273
+ // Drop shadows
274
+ @mixin box-shadow($shadow: 0 1px 3px rgba(0,0,0,.25)) {
275
+ -webkit-box-shadow: $shadow;
276
+ -moz-box-shadow: $shadow;
277
+ box-shadow: $shadow;
278
+ }
106
279
 
107
280
  // Transitions
108
281
  @mixin transition($transition) {
@@ -113,15 +286,84 @@
113
286
  transition: $transition;
114
287
  }
115
288
 
289
+ // Transformations
290
+ @mixin rotate($degrees) {
291
+ -webkit-transform: rotate($degrees);
292
+ -moz-transform: rotate($degrees);
293
+ -ms-transform: rotate($degrees);
294
+ -o-transform: rotate($degrees);
295
+ transform: rotate($degrees);
296
+ }
297
+ @mixin scale($ratio) {
298
+ -webkit-transform: scale($ratio);
299
+ -moz-transform: scale($ratio);
300
+ -ms-transform: scale($ratio);
301
+ -o-transform: scale($ratio);
302
+ transform: scale($ratio);
303
+ }
304
+ @mixin translate($x: 0, $y: 0) {
305
+ -webkit-transform: translate($x, $y);
306
+ -moz-transform: translate($x, $y);
307
+ -ms-transform: translate($x, $y);
308
+ -o-transform: translate($x, $y);
309
+ transform: translate($x, $y);
310
+ }
311
+ @mixin skew($x: 0, $y: 0) {
312
+ -webkit-transform: translate($x, $y);
313
+ -moz-transform: translate($x, $y);
314
+ -ms-transform: translate($x, $y);
315
+ -o-transform: translate($x, $y);
316
+ transform: translate($x, $y);
317
+ }
318
+ @mixin skew($x: 0, $y: 0) {
319
+ -webkit-transform: skew($x, $y);
320
+ -moz-transform: skew($x, $y);
321
+ -ms-transform: skew($x, $y);
322
+ -o-transform: skew($x, $y);
323
+ transform: skew($x, $y);
324
+ }
325
+
116
326
  // Background clipping
327
+ // Heads up: FF 3.6 and under need "padding" instead of "padding-box"
117
328
  @mixin background-clip($clip) {
118
329
  -webkit-background-clip: $clip;
119
330
  -moz-background-clip: $clip;
120
331
  background-clip: $clip;
121
332
  }
122
333
 
334
+ // Background sizing
335
+ @mixin background-size($size){
336
+ -webkit-background-size: $size;
337
+ -moz-background-size: $size;
338
+ -o-background-size: $size;
339
+ background-size: $size;
340
+ }
341
+
342
+
343
+ // Box sizing
344
+ @mixin box-sizing($boxmodel) {
345
+ -webkit-box-sizing: $boxmodel;
346
+ -moz-box-sizing: $boxmodel;
347
+ box-sizing: $boxmodel;
348
+ }
349
+
350
+ // User select
351
+ // For selecting text on the page
352
+ @mixin user-select($select) {
353
+ -webkit-user-select: $select;
354
+ -moz-user-select: $select;
355
+ -o-user-select: $select;
356
+ user-select: $select;
357
+ }
358
+
359
+ // Resize anything
360
+ @mixin resizable($direction: both) {
361
+ resize: $direction; // Options: horizontal, vertical, both
362
+ overflow: auto; // Safari fix
363
+ }
364
+
123
365
  // CSS3 Content Columns
124
- @mixin content-columns($columnCount, $columnGap: 20px) {
366
+ @mixin content-columns($columnCount, $columnGap: $gridColumnGutter) {
125
367
  -webkit-column-count: $columnCount;
126
368
  -moz-column-count: $columnCount;
127
369
  column-count: $columnCount;
@@ -130,60 +372,159 @@
130
372
  column-gap: $columnGap;
131
373
  }
132
374
 
375
+
376
+
377
+ // BACKGROUNDS
378
+ // --------------------------------------------------
379
+
133
380
  // Add an alphatransparency value to any background or border color (via Elyse Holladay)
134
381
  @mixin translucent-background($color: $white, $alpha: 1) {
135
- background-color: hsla(hue($color), saturation($color), lightness($color), $alpha);
382
+ background-color: hsla(hue($color), saturation($color), lightness($color), $alpha);
136
383
  }
137
384
 
138
385
  @mixin translucent-border($color: $white, $alpha: 1) {
139
386
  border-color: hsla(hue($color), saturation($color), lightness($color), $alpha);
140
- background-clip: padding-box;
387
+ @include background-clip(padding-box);
141
388
  }
142
389
 
390
+ // Gradient Bar Colors for buttons and alerts
391
+ @mixin gradientBar($primaryColor, $secondaryColor) {
392
+ @include gradient-vertical($primaryColor, $secondaryColor);
393
+ border-color: $secondaryColor $secondaryColor darken($secondaryColor, 15%);
394
+ border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%);
395
+ }
143
396
 
144
397
  // Gradients
145
398
  @mixin gradient-horizontal($startColor: #555, $endColor: #333) {
146
399
  background-color: $endColor;
147
- background-repeat: repeat-x;
148
- @include filter-gradient($startColor, $endColor, horizontal);
149
400
  background-image: -khtml-gradient(linear, left top, right top, from($startColor), to($endColor)); // Konqueror
150
- @include background-image(linear-gradient(left, $startColor, $endColor));
401
+ background-image: -moz-linear-gradient(left, $startColor, $endColor); // FF 3.6+
402
+ background-image: -ms-linear-gradient(left, $startColor, $endColor); // IE10
403
+ background-image: -webkit-gradient(linear, left top, right top, color-stop(0%, $startColor), color-stop(100%, $endColor)); // Safari 4+, Chrome 2+
404
+ background-image: -webkit-linear-gradient(left, $startColor, $endColor); // Safari 5.1+, Chrome 10+
405
+ background-image: -o-linear-gradient(left, $startColor, $endColor); // Opera 11.10
406
+ background-image: linear-gradient(left, $startColor, $endColor); // Le standard
407
+ background-repeat: repeat-x;
408
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=1); // IE9 and down
151
409
  }
152
-
153
- @mixin gradient-vertical ($startColor: #555, $endColor: #333) {
410
+ @mixin gradient-vertical($startColor: #555, $endColor: #333) {
154
411
  background-color: $endColor;
155
- background-repeat: repeat-x;
156
- @include filter-gradient($startColor, $endColor);
157
412
  background-image: -khtml-gradient(linear, left top, left bottom, from($startColor), to($endColor)); // Konqueror
158
- @include background-image(linear-gradient($startColor, $endColor));
413
+ background-image: -moz-linear-gradient(top, $startColor, $endColor); // FF 3.6+
414
+ background-image: -ms-linear-gradient(top, $startColor, $endColor); // IE10
415
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, $startColor), color-stop(100%, $endColor)); // Safari 4+, Chrome 2+
416
+ background-image: -webkit-linear-gradient(top, $startColor, $endColor); // Safari 5.1+, Chrome 10+
417
+ background-image: -o-linear-gradient(top, $startColor, $endColor); // Opera 11.10
418
+ //background-image: linear-gradient(top left, $startColor, $endColor); // The standard
419
+ background-repeat: repeat-x;
420
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=0); // IE9 and down
159
421
  }
160
-
161
- @mixin gradient-directional ($startColor: #555, $endColor: #333, $deg: 45deg) {
422
+ @mixin gradient-directional($startColor: #555, $endColor: #333, $deg: 45deg) {
162
423
  background-color: $endColor;
163
424
  background-repeat: repeat-x;
164
- @include background-image(linear-gradient(left top, $startColor, $endColor));
425
+ background-image: -moz-linear-gradient($deg, $startColor, $endColor); // FF 3.6+
426
+ background-image: -ms-linear-gradient($deg, $startColor, $endColor); // IE10
427
+ background-image: -webkit-linear-gradient($deg, $startColor, $endColor); // Safari 5.1+, Chrome 10+
428
+ background-image: -o-linear-gradient($deg, $startColor, $endColor); // Opera 11.10
429
+ background-image: linear-gradient($deg, $startColor, $endColor); // The standard
165
430
  }
166
-
167
431
  @mixin gradient-vertical-three-colors($startColor: #00b3ee, $midColor: #7a43b6, $colorStop: 50%, $endColor: #c3325f) {
168
432
  background-color: $endColor;
433
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from($startColor), color-stop($colorStop, $midColor), to($endColor));
434
+ background-image: -webkit-linear-gradient($startColor, $midColor $colorStop, $endColor);
435
+ background-image: -moz-linear-gradient(top, $startColor, $midColor $colorStop, $endColor);
436
+ background-image: -ms-linear-gradient($startColor, $midColor $colorStop, $endColor);
437
+ background-image: -o-linear-gradient($startColor, $midColor $colorStop, $endColor);
438
+ background-image: linear-gradient($startColor, $midColor $colorStop, $endColor);
169
439
  background-repeat: no-repeat;
170
- @include filter-gradient($startColor, $endColor);
171
- @include background-image(linear-gradient($startColor, $midColor $colorStop, $endColor));
440
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=0); // IE9 and down, gets no color-stop at all the proper fallback
172
441
  }
442
+ @mixin gradient-radial($centerColor: #555, $outsideColor: #333) {
443
+ background-color: $outsideColor;
444
+ background-image: -webkit-gradient(radial, center center, 0, center center, 460, from($centerColor), to($outsideColor));
445
+ background-image: -webkit-radial-gradient(circle, $centerColor, $outsideColor);
446
+ background-image: -moz-radial-gradient(circle, $centerColor, $outsideColor);
447
+ background-image: -ms-radial-gradient(circle, $centerColor, $outsideColor);
448
+ background-repeat: no-repeat;
449
+ // Opera cannot do radial gradients yet
450
+ }
451
+ @mixin gradient-striped($color,$angle: -45deg) {
452
+ background-color: $color;
453
+ 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));
454
+ 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);
455
+ 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);
456
+ 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);
457
+ 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);
458
+ //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);
459
+ }
173
460
 
174
-
175
- // Gradient Bar Colors for buttons and allerts
461
+ // Gradient Bar Colors for buttons and alerts
176
462
  @mixin gradientBar($primaryColor, $secondaryColor) {
177
463
  @include gradient-vertical($primaryColor, $secondaryColor);
178
- text-shadow: 0 -1px 0 rgba(0,0,0,.25);
179
464
  border-color: $secondaryColor $secondaryColor darken($secondaryColor, 15%);
180
- border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%);
465
+ border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fade-in(rgba(0,0,0,.1), 0.15);
181
466
  }
182
467
 
183
-
184
468
  // Reset filters for IE
185
469
  @mixin reset-filter() {
186
- -ms-filter: "progid:DXImageTransform.Microsoft.gradient(enabled=false)";
470
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
471
+ }
472
+
473
+ // Mixin for generating button backgrounds
474
+ // ---------------------------------------
475
+ @mixin buttonBackground($startColor, $endColor) {
476
+ // gradientBar will set the background to a pleasing blend of these, to support IE<=9
477
+ @include gradientBar($startColor, $endColor);
478
+ @include reset-filter();
479
+
480
+ // in these cases the gradient won't cover the background, so we override
481
+ &:hover, &:active, &.active, &.disabled, &[disabled] {
482
+ background-color: $endColor;
483
+ }
484
+
485
+ // IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves
486
+ &:active,
487
+ &.active {
488
+ background-color: darken($endColor, 10%) e("\9");
489
+ }
187
490
  }
188
491
 
189
- // Opacity (Will use compass version)
492
+
493
+ // COMPONENT MIXINS
494
+ // --------------------------------------------------
495
+
496
+ // POPOVER ARROWS
497
+ // -------------------------
498
+ // For tipsies and popovers
499
+ @mixin popoverArrow-top($arrowWidth: 5px) {
500
+ bottom: 0;
501
+ left: 50%;
502
+ margin-left: -$arrowWidth;
503
+ border-left: $arrowWidth solid transparent;
504
+ border-right: $arrowWidth solid transparent;
505
+ border-top: $arrowWidth solid $black;
506
+ }
507
+ @mixin popoverArrow-left($arrowWidth: 5px) {
508
+ top: 50%;
509
+ right: 0;
510
+ margin-top: -$arrowWidth;
511
+ border-top: $arrowWidth solid transparent;
512
+ border-bottom: $arrowWidth solid transparent;
513
+ border-left: $arrowWidth solid $black;
514
+ }
515
+ @mixin popoverArrow-bottom($arrowWidth: 5px) {
516
+ top: 0;
517
+ left: 50%;
518
+ margin-left: -$arrowWidth;
519
+ border-left: $arrowWidth solid transparent;
520
+ border-right: $arrowWidth solid transparent;
521
+ border-bottom: $arrowWidth solid $black;
522
+ }
523
+ @mixin popoverArrow-right($arrowWidth: 5px) {
524
+ top: 50%;
525
+ left: 0;
526
+ margin-top: -$arrowWidth;
527
+ border-top: $arrowWidth solid transparent;
528
+ border-bottom: $arrowWidth solid transparent;
529
+ border-right: $arrowWidth solid $black;
530
+ }