bootstrap-sass 1.2.1 → 1.3.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.

Potentially problematic release.


This version of bootstrap-sass might be problematic. Click here for more details.

@@ -0,0 +1,8 @@
1
+ //= require bootstrap-modal
2
+ //= require bootstrap-dropdown
3
+ //= require bootstrap-scrollspy
4
+ //= require bootstrap-tabs
5
+ //= require bootstrap-twipsy
6
+ //= require bootstrap-popover
7
+ //= require bootstrap-alerts
8
+
@@ -1,22 +1,23 @@
1
1
  /*!
2
- * Bootstrap 1.2.0
2
+ * Bootstrap v1.3.0
3
3
  *
4
4
  * Copyright 2011 Twitter, Inc
5
5
  * Licensed under the Apache License v2.0
6
6
  * http://www.apache.org/licenses/LICENSE-2.0
7
7
  *
8
- * Designed and built with all the love in the world @twitter by @mdo and @fat, and crafted into SASS by the fine typing of Thomas McDonald
9
- * Date: 6th September, 2011
8
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
9
+ * Converted to SASS by Thomas McDonald
10
+ *
11
+ * Date: Fri Sep 16 11:24:41 PDT 2011
10
12
  */
11
13
 
12
- // CSS Reset
13
14
  @import "bootstrap/reset";
14
15
 
15
- // Core
16
- @import "bootstrap/preboot";
16
+ @import "bootstrap/variables";
17
+ @import "bootstrap/mixins";
18
+
17
19
  @import "bootstrap/scaffolding";
18
20
 
19
- // Styled patterns and elements
20
21
  @import "bootstrap/type";
21
22
  @import "bootstrap/forms";
22
23
  @import "bootstrap/tables";
@@ -15,18 +15,19 @@ fieldset {
15
15
  padding-top: $baseline;
16
16
  legend {
17
17
  display: block;
18
- margin-left: 150px;
19
- font-size: 20px;
18
+ padding-left: 150px;
19
+ font-size: $basefont * 1.5;
20
20
  line-height: 1;
21
- *margin: 0 0 5px 145px; /* IE6-7 */
22
- *line-height: 1.5; /* IE6-7 */
23
21
  color: $grayDark;
22
+ *padding: 0 0 5px 145px; /* IE6-7 */
23
+ *line-height: 1.5; /* IE6-7 */
24
24
  }
25
25
  }
26
26
 
27
27
  // Parent element that clears floats and wraps labels and fields together
28
- .clearfix {
28
+ form .clearfix {
29
29
  margin-bottom: $baseline;
30
+ @include clearfix()
30
31
  }
31
32
 
32
33
  // Set font for forms
@@ -37,8 +38,8 @@ label, input, select, textarea {
37
38
  // Float labels left
38
39
  label {
39
40
  padding-top: 6px;
40
- font-size: 13px;
41
- line-height: 18px;
41
+ font-size: $basefont;
42
+ line-height: $baseline;
42
43
  float: left;
43
44
  width: 130px;
44
45
  text-align: right;
@@ -46,7 +47,7 @@ label {
46
47
  }
47
48
 
48
49
  // Shift over the inside div to align all label's relevant content
49
- div.input {
50
+ form .input {
50
51
  margin-left: 150px;
51
52
  }
52
53
 
@@ -61,7 +62,7 @@ input, textarea, select, .uneditable-input {
61
62
  width: 210px;
62
63
  height: $baseline;
63
64
  padding: 4px;
64
- font-size: 13px;
65
+ font-size: $basefont;
65
66
  line-height: $baseline;
66
67
  color: $gray;
67
68
  border: 1px solid #ccc;
@@ -80,7 +81,7 @@ input[type=checkbox], input[type=radio] {
80
81
  }
81
82
 
82
83
  input[type=file] {
83
- background-color: #fff;
84
+ background-color: $white;
84
85
  padding: initial;
85
86
  border: initial;
86
87
  line-height: initial;
@@ -93,19 +94,27 @@ input[type=button], input[type=reset], input[type=submit] {
93
94
  }
94
95
 
95
96
  select, input[type=file] {
96
- height: $baseline * 1.5;
97
+ height: $baseline * 1.5; // In IE7, the height of the select element cannot be changed by height, only font-size
97
98
  line-height: $baseline * 1.5;
99
+ *margin-top: 4px; /* For IE7, add top margin to align select with labels */
100
+ }
101
+
102
+ // Make multiple select elements height not fixed
103
+ select[multiple] {
104
+ height: inherit;
98
105
  }
99
106
 
100
107
  textarea {
101
108
  height: auto;
102
109
  }
103
110
 
111
+ // For text that needs to appear as an input but should not be an input
104
112
  .uneditable-input {
105
- background-color: #eee;
113
+ background-color: $white;
106
114
  display: block;
107
- border-color: #ccc;
108
- @include box-shadow(inset 0 1px 2px rgba(0,0,0,.075));
115
+ border-color: #eee;
116
+ @include box-shadow(inset 0 1px 2px rgba(0,0,0,.025));
117
+ cursor: not-allowed;
109
118
  }
110
119
 
111
120
  // Placeholder text gets special styles; can't be bundled together though for some reason
@@ -117,20 +126,24 @@ textarea {
117
126
  }
118
127
 
119
128
  // Focus states
120
- input, select, textarea {
129
+ input, textarea {
121
130
  $transition: border linear .2s, box-shadow linear .2s;
122
131
  @include transition($transition);
123
132
  @include box-shadow(inset 0 1px 3px rgba(0,0,0,.1));
124
133
  }
125
134
  input:focus, textarea:focus {
126
- outline: none;
135
+ outline: 0;
127
136
  border-color: rgba(82,168,236,.8);
128
137
  $shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6);
129
138
  @include box-shadow($shadow);
130
139
  }
140
+ input[type=file]:focus, input[type=checkbox]:focus, select:focus {
141
+ @include box-shadow(none); // override for file inputs
142
+ outline: 1px dotted #666; // Selet elements don't get box-shadow styles, so instead we do outline
143
+ }
131
144
 
132
145
  // Error styles
133
- form div.error {
146
+ form div.clearfix.error {
134
147
  background: lighten($red, 57%);
135
148
  padding: 10px 0;
136
149
  margin: -10px 0 10px;
@@ -157,6 +170,7 @@ form div.error {
157
170
  }
158
171
 
159
172
  // Form element sizes
173
+ // TODO v2: remove duplication here and just stick to .input-[size] in light of adding .spanN sizes
160
174
  .input-mini, input.mini, textarea.mini, select.mini {
161
175
  width: 60px;
162
176
  }
@@ -176,14 +190,42 @@ form div.error {
176
190
  width: 530px;
177
191
  }
178
192
  textarea.xxlarge {
179
- overflow-y: scroll;
193
+ overflow-y: auto;
180
194
  }
181
195
 
182
- // Turn off focus for disabled (read-only) form elements
183
- input[readonly]:focus, textarea[readonly]:focus, input.disabled {
184
- background: #f5f5f5;
196
+ // Grid style input sizes
197
+ // This is a duplication of the main grid .columns() mixin, but subtracts 10px to account for input padding and border
198
+ @mixin formColumns($columnSpan: 1) {
199
+ display: inline-block;
200
+ float: none;
201
+ width: (($gridColumnWidth - 10) * $columnSpan) + (($gridColumnWidth - 10) * ($columnSpan - 1));
202
+ margin-left: 0;
203
+ }
204
+ input, textarea, select {
205
+ // Default columns
206
+ &.span1 { @include formColumns(1); }
207
+ &.span2 { @include formColumns(2); }
208
+ &.span3 { @include formColumns(3); }
209
+ &.span4 { @include formColumns(4); }
210
+ &.span5 { @include formColumns(5); }
211
+ &.span6 { @include formColumns(6); }
212
+ &.span7 { @include formColumns(7); }
213
+ &.span8 { @include formColumns(8); }
214
+ &.span9 { @include formColumns(9); }
215
+ &.span10 { @include formColumns(10); }
216
+ &.span11 { @include formColumns(11); }
217
+ &.span12 { @include formColumns(12); }
218
+ &.span13 { @include formColumns(13); }
219
+ &.span14 { @include formColumns(14); }
220
+ &.span15 { @include formColumns(15); }
221
+ &.span16 { @include formColumns(16); }
222
+ }
223
+
224
+ // Disabled and read-only inputs
225
+ input[disabled], select[disabled], textarea[disabled], input[readonly], select[readonly], textarea[readonly] {
226
+ background-color: #f5f5f5;
185
227
  border-color: #ddd;
186
- @include box-shadow(none);
228
+ cursor: not-allowed;
187
229
  }
188
230
 
189
231
  // Actions (the buttons)
@@ -207,7 +249,7 @@ input[readonly]:focus, textarea[readonly]:focus, input.disabled {
207
249
 
208
250
  // Help Text
209
251
  .help-inline, .help-block {
210
- font-size: 12px;
252
+ font-size: $basefont - 2;
211
253
  line-height: $baseline;
212
254
  color: $grayLight;
213
255
  }
@@ -246,20 +288,22 @@ input[readonly]:focus, textarea[readonly]:focus, input.disabled {
246
288
  @include border-radius(0 3px 3px 0);
247
289
  }
248
290
  .add-on {
291
+ position: relative;
249
292
  background: #f5f5f5;
293
+ border: 1px solid #ccc;
294
+ z-index: 2;
250
295
  float: left;
251
296
  display: block;
252
297
  width: auto;
253
298
  min-width: 16px;
299
+ height: 18px;
254
300
  padding: 4px 4px 4px 5px;
255
- color: $grayLight;
301
+ margin-right: -1px;
256
302
  font-weight: normal;
257
303
  line-height: 18px;
258
- height: 18px;
304
+ color: $grayLight;
259
305
  text-align: center;
260
- text-shadow: 0 1px 0 #fff;
261
- border: 1px solid #ccc;
262
- border-right-width: 0;
306
+ text-shadow: 0 1px 0 $white;
263
307
  @include border-radius(3px 0 0 3px);
264
308
  }
265
309
  .active {
@@ -279,8 +323,8 @@ input[readonly]:focus, textarea[readonly]:focus, input.disabled {
279
323
  }
280
324
  .add-on {
281
325
  @include border-radius(0 3px 3px 0);
282
- border-right-width: 1px;
283
- border-left-width: 0;
326
+ margin-right: 0;
327
+ margin-left: -1px;
284
328
  }
285
329
  }
286
330
 
@@ -292,31 +336,34 @@ input[readonly]:focus, textarea[readonly]:focus, input.disabled {
292
336
  display: block;
293
337
  padding: 0;
294
338
  width: 100%;
295
- label {
296
- display: block;
297
- float: none;
298
- width: auto;
299
- padding: 0;
300
- line-height: $baseline;
301
- text-align: left;
302
- white-space: normal;
303
- strong {
304
- color: $gray;
305
- }
306
- small {
307
- font-size: 12px;
308
- font-weight: normal;
309
- }
310
- }
311
- ul.inputs-list {
312
- margin-left: 25px;
313
- margin-bottom: 10px;
314
- padding-top: 0;
339
+ }
340
+ label {
341
+ display: block;
342
+ float: none;
343
+ width: auto;
344
+ padding: 0;
345
+ line-height: $baseline;
346
+ text-align: left;
347
+ white-space: normal;
348
+ strong {
349
+ color: $gray;
315
350
  }
316
- &:first-child {
317
- padding-top: 5px;
351
+ small {
352
+ font-size: $basefont - 2;
353
+ font-weight: normal;
318
354
  }
319
355
  }
356
+ .inputs-list {
357
+ margin-left: 25px;
358
+ margin-bottom: 10px;
359
+ padding-top: 0;
360
+ }
361
+ &:first-child {
362
+ padding-top: 6px;
363
+ }
364
+ li + li {
365
+ padding-top: 2px;
366
+ }
320
367
  input[type=radio], input[type=checkbox] {
321
368
  margin-bottom: 0;
322
369
  }
@@ -329,7 +376,7 @@ input[readonly]:focus, textarea[readonly]:focus, input.disabled {
329
376
  padding-top: $baseline / 2;
330
377
  }
331
378
  legend {
332
- margin-left: 0;
379
+ padding-left: 0;
333
380
  }
334
381
  label {
335
382
  display: block;
@@ -356,7 +403,7 @@ input[readonly]:focus, textarea[readonly]:focus, input.disabled {
356
403
  }
357
404
  }
358
405
  }
359
- div.error {
406
+ div.clearfix.error {
360
407
  padding-top: 10px;
361
408
  padding-bottom: 10px;
362
409
  padding-left: 10px;
@@ -1,65 +1,17 @@
1
- /* preboot.css.scss
2
- * Variables and mixins to pre-ignite any new web development project
3
- * ------------------------------------------------------------------ */
1
+ /* mixins.css.scss
2
+ * Snippets of reusable CSS to develop faster and keep code readable
3
+ * ----------------------------------------------------------------- */
4
4
 
5
- // VARIABLES
6
- // ---------
7
-
8
- // Links
9
- $linkColor: #0069d6;
10
- $linkColorHover: darken($linkColor, 10);
11
-
12
- // Grays
13
- $black: #000;
14
- $grayDark: lighten($black, 25%);
15
- $gray: lighten($black, 50%);
16
- $grayLight: lighten($black, 75%);
17
- $grayLighter: lighten($black, 90%);
18
- $white: #fff;
19
-
20
- // Accent Colors
21
- $blue: #049CDB;
22
- $blueDark: #0064CD;
23
- $green: #46a546;
24
- $red: #9d261d;
25
- $yellow: #ffc40d;
26
- $orange: #f89406;
27
- $pink: #c3325f;
28
- $purple: #7a43b6;
29
-
30
- // Baseline grid
31
- $basefont: 13px;
32
- $baseline: 18px;
33
-
34
- // Griditude
35
- $gridColumns: 16;
36
- $gridColumnWidth: 40px;
37
- $gridGutterWidth: 20px;
38
- $extraSpace: ($gridGutterWidth * 2); // For our grid calculations
39
- $siteWidth: ($gridColumns * $gridColumnWidth) + ($gridGutterWidth * ($gridColumns - 1));
40
-
41
- // Color Scheme
42
- $baseColor: $blue; // Set a base color
43
- $complement: complement($baseColor); // Determine a complementary color
44
- $split1: adjust-hue($baseColor, 158); // Split complements
45
- $split2: adjust-hue($baseColor, -158);
46
- $triad1: adjust-hue($baseColor, 135); // Triads colors
47
- $triad2: adjust-hue($baseColor, -135);
48
- $tetra1: adjust-hue($baseColor, 90); // Tetra colors
49
- $tetra2: adjust-hue($baseColor, -90);
50
- $analog1: adjust-hue($baseColor, 22); // Analogs colors
51
- $analog2: adjust-hue($baseColor, -22);
52
-
53
-
54
- // MIXINS
55
- // ------
56
5
 
57
6
  // Clearfix for clearing floats like a boss h5bp.com/q
58
- @mixin clearfix {
7
+ @mixin clearfix() {
59
8
  zoom: 1;
60
- &:before, &:after {
9
+ &:before,
10
+ &:after {
61
11
  display: table;
62
12
  content: "";
13
+ zoom: 1;
14
+ *display: inline;
63
15
  }
64
16
  &:after {
65
17
  clear: both;
@@ -67,9 +19,10 @@ $analog2: adjust-hue($baseColor, -22);
67
19
  }
68
20
 
69
21
  // Center-align a block level element
70
- @mixin center-block {
71
- display: block;
72
- margin: 0 auto;
22
+ @mixin center-block() {
23
+ display: block;
24
+ margin-left: auto;
25
+ margin-right: auto;
73
26
  }
74
27
 
75
28
  // Sizing shortcuts
@@ -117,9 +70,10 @@ $analog2: adjust-hue($baseColor, -22);
117
70
  }
118
71
 
119
72
  // Grid System
120
- .container {
73
+ @mixin fixed-container() {
121
74
  width: $siteWidth;
122
- margin: 0 auto;
75
+ margin-left: auto;
76
+ margin-right: auto;
123
77
  @include clearfix();
124
78
  }
125
79
  @mixin columns($columnSpan: 1) {
@@ -128,6 +82,17 @@ $analog2: adjust-hue($baseColor, -22);
128
82
  @mixin offset($columnOffset: 1) {
129
83
  margin-left: ($gridColumnWidth * $columnOffset) + ($gridGutterWidth * ($columnOffset - 1)) + $extraSpace;
130
84
  }
85
+ // Necessary grid styles for every column to make them appear next to each other horizontally
86
+ @mixin gridColumn() {
87
+ display: inline;
88
+ float: left;
89
+ margin-left: $gridGutterWidth;
90
+ }
91
+ // makeColumn can be used to mark any element (e.g., .content-primary) as a column without changing markup to .span something
92
+ @mixin makeColumn($columnSpan: 1) {
93
+ @include gridColumn();
94
+ @include columns($columnSpan);
95
+ }
131
96
 
132
97
  // Border Radius
133
98
  @mixin border-radius($radius: 5px) {
@@ -147,6 +112,8 @@ $analog2: adjust-hue($baseColor, -22);
147
112
  @mixin transition($transition) {
148
113
  -webkit-transition: $transition;
149
114
  -moz-transition: $transition;
115
+ -ms-transition: $transition;
116
+ -o-transition: $transition;
150
117
  transition: $transition;
151
118
  }
152
119
 
@@ -176,6 +143,14 @@ $analog2: adjust-hue($baseColor, -22);
176
143
  background-clip: padding-box;
177
144
  }
178
145
 
146
+ // Gradient Bar Colors for buttons and allerts
147
+ @mixin gradientBar($primaryColor, $secondaryColor) {
148
+ @include vertical-gradient($primaryColor, $secondaryColor);
149
+ text-shadow: 0 -1px 0 rgba(0,0,0,.25);
150
+ border-color: $secondaryColor $secondaryColor darken($secondaryColor, 15%);
151
+ border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%);
152
+ }
153
+
179
154
  // Gradients
180
155
  @mixin horizontal-gradient($startColor: #555, $endColor: #333) {
181
156
  background-color: $endColor;
@@ -187,6 +162,7 @@ $analog2: adjust-hue($baseColor, -22);
187
162
  background-image: -webkit-linear-gradient(left, $startColor, $endColor); // Safari 5.1+, Chrome 10+
188
163
  background-image: -o-linear-gradient(left, $startColor, $endColor); // Opera 11.10
189
164
  background-image: linear-gradient(left, $startColor, $endColor); // Le standard
165
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#{$startColor}, endColorstr=#{$endColor}, GradientType=1); // IE9 and down
190
166
  }
191
167
  @mixin vertical-gradient($startColor: #555, $endColor: #333) {
192
168
  background-color: $endColor;
@@ -198,6 +174,7 @@ $analog2: adjust-hue($baseColor, -22);
198
174
  background-image: -webkit-linear-gradient(top, $startColor, $endColor); // Safari 5.1+, Chrome 10+
199
175
  background-image: -o-linear-gradient(top, $startColor, $endColor); // Opera 11.10
200
176
  background-image: linear-gradient(top, $startColor, $endColor); // The standard
177
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#{$startColor}, endColorstr=#{$endColor}, GradientType=0); // IE9 and down
201
178
  }
202
179
  @mixin directional-gradient($startColor: #555, $endColor: #333, $deg: 45deg) {
203
180
  background-color: $endColor;
@@ -217,49 +194,19 @@ $analog2: adjust-hue($baseColor, -22);
217
194
  background-image: -ms-linear-gradient($startColor, $midColor $colorStop, $endColor);
218
195
  background-image: -o-linear-gradient($startColor, $midColor $colorStop, $endColor);
219
196
  background-image: linear-gradient($startColor, $midColor $colorStop, $endColor);
197
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#{$startColor}, endColorstr=#{$endColor}, GradientType=0); // IE9 and down, gets no color-stop at all for proper fallback
220
198
  }
221
199
 
222
- // Gradient Bar Colors for buttons and allerts
223
- @mixin gradientBar($primaryColor, $secondaryColor) {
224
- @include vertical-gradient($primaryColor, $secondaryColor);
225
- text-shadow: 0 -1px 0 rgba(0,0,0,.25);
226
- border-color: $secondaryColor $secondaryColor darken($secondaryColor, 15%);
227
- border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%);
228
- }
229
- // Shared colors for buttons and alerts
230
- .btn,
231
- .alert-message {
232
- // Set text color
233
- &.danger,
234
- &.danger:hover,
235
- &.error,
236
- &.error:hover,
237
- &.success,
238
- &.success:hover,
239
- &.info,
240
- &.info:hover {
241
- color: $white
242
- }
243
- // Danger and error appear as red
244
- &.danger,
245
- &.error {
246
- @include gradientBar(#ee5f5b, #c43c35);
247
- }
248
- // Success appears as green
249
- &.success {
250
- @include gradientBar(#62c462, #57a957);
251
- }
252
- // Info appears as a neutral blue
253
- &.info {
254
- @include gradientBar(#5bc0de, #339bb9);
255
- }
200
+ // Reset filters for IE
201
+ @mixin reset-filter() {
202
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false)
256
203
  }
257
204
 
258
205
  // Opacity
259
206
  @mixin opacity($opacity: 100) {
207
+ filter: alpha(opacity=#{$opacity});
260
208
  -khtml-opacity: $opacity / 100;
261
209
  -moz-opacity: $opacity / 100;
262
210
  opacity: $opacity / 100;
263
211
  }
264
212
 
265
-