compass-bootstrap 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,276 @@
1
+ /* Preboot.scss
2
+ * Variables and mixins to pre-ignite any new web development project
3
+ * ------------------------------------------------------------------ */
4
+
5
+
6
+ // VARIABLES
7
+ // ---------
8
+
9
+ // / Links
10
+ $linkColor: #0069d6;
11
+ $linkColorHover: darken($linkColor, 10);
12
+
13
+ // Grays
14
+ $black: #000;
15
+ $grayDark: lighten($black, 25%);
16
+ $gray: lighten($black, 50%);
17
+ $grayLight: lighten($black, 75%);
18
+ $grayLighter: lighten($black, 90%);
19
+ $white: #fff;
20
+
21
+ // Accent Colors
22
+ $blue: #049CDB;
23
+ $blueDark: #0064CD;
24
+ $green: #46a546;
25
+ $red: #9d261d;
26
+ $yellow: #ffc40d;
27
+ $orange: #f89406;
28
+ $pink: #c3325f;
29
+ $purple: #7a43b6;
30
+
31
+ // Baseline grid
32
+ $basefont: 13px;
33
+ $baseline: 18px;
34
+
35
+ // Griditude
36
+ $gridColumns: 16;
37
+ $gridColumnWidth: 40px;
38
+ $gridGutterWidth: 20px;
39
+ $extraSpace: ($gridGutterWidth * 2); // For our grid calculations
40
+ $siteWidth: ($gridColumns * $gridColumnWidth) + ($gridGutterWidth * ($gridColumns - 1));
41
+
42
+ // Color Scheme
43
+ $baseColor: $blue; // Set a base color
44
+ $complement: spin($baseColor, 180); // Determine a complementary color
45
+ $split1: spin($baseColor, 158); // Split complements
46
+ $split2: spin($baseColor, -158);
47
+ $triad1: spin($baseColor, 135); // Triads colors
48
+ $triad2: spin($baseColor, -135);
49
+ $tetra1: spin($baseColor, 90); // Tetra colors
50
+ $tetra2: spin($baseColor, -90);
51
+ $analog1: spin($baseColor, 22); // Analogs colors
52
+ $analog2: spin($baseColor, -22);
53
+
54
+
55
+ // MIXINS
56
+ // ------
57
+
58
+ // Clearfix for clearing floats like a boss h5bp.com/q
59
+ @mixin clearfix() {
60
+ zoom: 1;
61
+ &:before, &:after {
62
+ display: table;
63
+ content: "";
64
+ }
65
+ &:after {
66
+ clear: both;
67
+ }
68
+ }
69
+
70
+ // Center-align a block level element
71
+ @mixin center-block() {
72
+ display: block;
73
+ margin: 0 auto;
74
+ }
75
+
76
+ // Sizing shortcuts
77
+ @mixin size($height: 5px, $width: 5px) {
78
+ height: $height;
79
+ width: $width;
80
+ }
81
+ @mixin square($size: 5px) {
82
+ @include size($size, $size);
83
+ }
84
+
85
+ // Input placeholder text
86
+ @mixin placeholder($color: $grayLight) {
87
+ :-moz-placeholder {
88
+ color: $color;
89
+ }
90
+ ::-webkit-input-placeholder {
91
+ color: $color;
92
+ }
93
+ }
94
+
95
+ // Font Stacks
96
+ @mixin shorthand($weight: normal, $size: 14px, $lineHeight: 20px) {
97
+ font-size: $size;
98
+ font-weight: $weight;
99
+ line-height: $lineHeight;
100
+ }
101
+ @mixin sans-serif($weight: normal, $size: 14px, $lineHeight: 20px) {
102
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
103
+ font-size: $size;
104
+ font-weight: $weight;
105
+ line-height: $lineHeight;
106
+ }
107
+ @mixin serif($weight: normal, $size: 14px, $lineHeight: 20px) {
108
+ font-family: "Georgia", Times New Roman, Times, serif;
109
+ font-size: $size;
110
+ font-weight: $weight;
111
+ line-height: $lineHeight;
112
+ }
113
+ @mixin monospace($weight: normal, $size: 12px, $lineHeight: 20px) {
114
+ font-family: "Monaco", Courier New, monospace;
115
+ font-size: $size;
116
+ font-weight: $weight;
117
+ line-height: $lineHeight;
118
+ }
119
+
120
+
121
+ // Grid System
122
+ @mixin container {
123
+ width: $siteWidth;
124
+ margin: 0 auto;
125
+ @include clearfix();
126
+ }
127
+ @mixin columns($columnSpan: 1) {
128
+ width: ($gridColumnWidth * $columnSpan) + ($gridGutterWidth * ($columnSpan - 1));
129
+ }
130
+ @mixin offset($columnOffset: 1) {
131
+ margin-left: ($gridColumnWidth * $columnOffset) + ($gridGutterWidth * ($columnOffset - 1)) + $extraSpace;
132
+ }
133
+
134
+ // Border Radius
135
+ //@mixin border-radius($radius: 5px) {
136
+ // -webkit-border-radius: $radius;
137
+ // -moz-border-radius: $radius;
138
+ // border-radius: $radius;
139
+ //}
140
+
141
+ // Drop shadows
142
+ @mixin bt-box-shadow($shadow: 0 1px 3px rgba(0,0,0,.25)) {
143
+ -webkit-box-shadow: $shadow;
144
+ -moz-box-shadow: $shadow;
145
+ box-shadow: $shadow;
146
+ }
147
+
148
+ // Transitions
149
+ @mixin transition($transition) {
150
+ -webkit-transition: $transition;
151
+ -moz-transition: $transition;
152
+ transition: $transition;
153
+ }
154
+
155
+ // Background clipping
156
+ @mixin background-clip($clip) {
157
+ -webkit-background-clip: $clip;
158
+ -moz-background-clip: $clip;
159
+ background-clip: $clip;
160
+ }
161
+
162
+ // CSS3 Content Columns
163
+ @mixin content-columns($columnCount, $columnGap: 20px) {
164
+ -webkit-column-count: $columnCount;
165
+ -moz-column-count: $columnCount;
166
+ column-count: $columnCount;
167
+ -webkit-column-gap: $columnGap;
168
+ -moz-column-gap: $columnGap;
169
+ column-gap: $columnGap;
170
+ }
171
+
172
+ // Add an alphatransparency value to any background or border color (via Elyse Holladay)
173
+ @mixin translucent-background($color: $white, $alpha: 1) {
174
+ background-color: hsla(hue($color), saturation($color), lightness($color), $alpha);
175
+ }
176
+ @mixin translucent-border($color: $white, $alpha: 1) {
177
+ border-color: hsla(hue($color), saturation($color), lightness($color), $alpha);
178
+ background-clip: padding-box;
179
+ }
180
+
181
+ // Gradients
182
+ @mixin horizontal-gradient ($startColor: #555, $endColor: #333) {
183
+ background-color: $endColor;
184
+ background-repeat: repeat-x;
185
+ background-image: -khtml-gradient(linear, left top, right top, from($startColor), to($endColor)); // Konqueror
186
+ background-image: -moz-linear-gradient(left, $startColor, $endColor); // FF 3.6+
187
+ background-image: -ms-linear-gradient(left, $startColor, $endColor); // IE10
188
+ background-image: -webkit-gradient(linear, left top, right top, color-stop(0%, $startColor), color-stop(100%, $endColor)); // Safari 4+, Chrome 2+
189
+ background-image: -webkit-linear-gradient(left, $startColor, $endColor); // Safari 5.1+, Chrome 10+
190
+ background-image: -o-linear-gradient(left, $startColor, $endColor); // Opera 11.10
191
+ background-image: linear-gradient(left, $startColor, $endColor); // Le standard
192
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=$startColor, endColorstr=$endColor, GradientType=0); // IE9 and down
193
+ }
194
+ @mixin vertical-gradient($startColor: #555, $endColor: #333) {
195
+ background-color: $endColor;
196
+ background-repeat: repeat-x;
197
+ background-image: -khtml-gradient(linear, left top, left bottom, from($startColor), to($endColor)); // Konqueror
198
+ background-image: -moz-linear-gradient(top, $startColor, $endColor); // FF 3.6+
199
+ background-image: -ms-linear-gradient(top, $startColor, $endColor); // IE10
200
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, $startColor), color-stop(100%, $endColor)); // Safari 4+, Chrome 2+
201
+ background-image: -webkit-linear-gradient(top, $startColor, $endColor); // Safari 5.1+, Chrome 10+
202
+ background-image: -o-linear-gradient(top, $startColor, $endColor); // Opera 11.10
203
+ background-image: linear-gradient(top, $startColor, $endColor); // The standard
204
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=$startColor, endColorstr=$endColor, GradientType=1); // IE9 and down
205
+ }
206
+ @mixin directional-gradient ($startColor: #555, $endColor: #333, $deg: 45deg) {
207
+ background-color: $endColor;
208
+ background-repeat: repeat-x;
209
+ background-image: -moz-linear-gradient($deg, $startColor, $endColor); // FF 3.6+
210
+ background-image: -ms-linear-gradient($deg, $startColor, $endColor); // IE10
211
+ background-image: -webkit-linear-gradient($deg, $startColor, $endColor); // Safari 5.1+, Chrome 10+
212
+ background-image: -o-linear-gradient($deg, $startColor, $endColor); // Opera 11.10
213
+ background-image: linear-gradient($deg, $startColor, $endColor); // The standard
214
+ }
215
+ @mixin vertical-three-colors-gradient($startColor: #00b3ee, $midColor: #7a43b6, $colorStop: 50%, $endColor: #c3325f) {
216
+ background-color: $endColor;
217
+ background-repeat: no-repeat;
218
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from($startColor), color-stop($colorStop, $midColor), to($endColor));
219
+ background-image: -webkit-linear-gradient($startColor, $midColor $colorStop, $endColor);
220
+ background-image: -moz-linear-gradient(top, $startColor, $midColor $colorStop, $endColor);
221
+ background-image: -ms-linear-gradient($startColor, $midColor $colorStop, $endColor);
222
+ background-image: -o-linear-gradient($startColor, $midColor $colorStop, $endColor);
223
+ background-image: linear-gradient($startColor, $midColor $colorStop, $endColor);
224
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=$startColor, endColorstr=$endColor, GradientType=0); // IE9 and down, gets no color-stop at all for proper fallback
225
+ }
226
+
227
+
228
+ // Gradient Bar Colors for buttons and allerts
229
+ @mixin gradientBar($primaryColor, $secondaryColor) {
230
+ @include vertical-gradient($primaryColor, $secondaryColor);
231
+ text-shadow: 0 -1px 0 rgba(0,0,0,.25);
232
+ border-color: $secondaryColor $secondaryColor darken($secondaryColor, 15%);
233
+ border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%);
234
+ }
235
+ // Shared colors for buttons and alerts
236
+ .btn,
237
+ .alert-message {
238
+ // Set text color
239
+ &.danger,
240
+ &.danger:hover,
241
+ &.error,
242
+ &.error:hover,
243
+ &.success,
244
+ &.success:hover,
245
+ &.info,
246
+ &.info:hover {
247
+ color: $white
248
+ }
249
+ // Danger and error appear as red
250
+ &.danger,
251
+ &.error {
252
+ @include gradientBar(#ee5f5b, #c43c35);
253
+ }
254
+ // Success appears as green
255
+ &.success {
256
+ @include gradientBar(#62c462, #57a957);
257
+ }
258
+ // Info appears as a neutral blue
259
+ &.info {
260
+ @include gradientBar(#5bc0de, #339bb9);
261
+ }
262
+ }
263
+
264
+
265
+ // Reset filters for IE
266
+ @mixin reset-filter() {
267
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
268
+ }
269
+
270
+ // Opacity
271
+ @mixin bt-opacity($opacity: 100) {
272
+ filter: alpha(opacity=$opacity);
273
+ -khtml-opacity: $opacity / 100;
274
+ -moz-opacity: $opacity / 100;
275
+ opacity: $opacity / 100;
276
+ }
@@ -0,0 +1,137 @@
1
+ /* Reset.scss
2
+
3
+ * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc).
4
+ * ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
5
+
6
+
7
+ // ERIC MEYER RESET
8
+ // --------------------------------------------------
9
+
10
+ html, body { margin: 0; padding: 0; }
11
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, cite, code, del, dfn, em, img, q, s, samp, small, strike, strong, sub, sup, tt, var, dd, dl, dt, li, ol, ul, fieldset, form, label, legend, button, table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; font-weight: normal; font-style: normal; font-size: 100%; line-height: 1; font-family: inherit; }
12
+ table { border-collapse: collapse; border-spacing: 0; }
13
+ ol, ul { list-style: none; }
14
+ q:before, q:after, blockquote:before, blockquote:after { content: ""; }
15
+
16
+
17
+ // Normalize.css
18
+ // Pulling in select resets form the normalize.css project
19
+ // --------------------------------------------------
20
+
21
+ // Display in IE6-9 and FF3
22
+ // -------------------------
23
+ // Source: http://github.com/necolas/normalize.css
24
+ html {
25
+ overflow-y: scroll;
26
+ font-size: 100%;
27
+ -webkit-text-size-adjust: 100%;
28
+ -ms-text-size-adjust: 100%;
29
+ }
30
+ // Focus states
31
+ a:focus {
32
+ outline: thin dotted;
33
+ }
34
+
35
+ // Display in IE6-9 and FF3
36
+ // -------------------------
37
+ // Source: http://github.com/necolas/normalize.css
38
+ article,
39
+ aside,
40
+ details,
41
+ figcaption,
42
+ figure,
43
+ footer,
44
+ header,
45
+ hgroup,
46
+ nav,
47
+ section {
48
+ display: block;
49
+ }
50
+
51
+ // Display block in IE6-9 and FF3
52
+ // -------------------------
53
+ // Source: http://github.com/necolas/normalize.css
54
+ audio,
55
+ canvas,
56
+ video {
57
+ display: inline-block;
58
+ *display: inline;
59
+ *zoom: 1;
60
+ }
61
+
62
+ // Prevents modern browsers from displaying 'audio' without controls
63
+ // -------------------------
64
+ // Source: http://github.com/necolas/normalize.css
65
+ audio:not([controls]) {
66
+ display: none;
67
+ }
68
+
69
+ // Prevents sub and sup affecting line-height in all browsers
70
+ // -------------------------
71
+ // Source: http://github.com/necolas/normalize.css
72
+ sub,
73
+ sup {
74
+ font-size: 75%;
75
+ line-height: 0;
76
+ position: relative;
77
+ vertical-align: baseline;
78
+ }
79
+ sup {
80
+ top: -0.5em;
81
+ }
82
+ sub {
83
+ bottom: -0.25em;
84
+ }
85
+
86
+ // Img border in a's and image quality
87
+ // -------------------------
88
+ // Source: http://github.com/necolas/normalize.css
89
+ img {
90
+ border: 0;
91
+ -ms-interpolation-mode: bicubic;
92
+ }
93
+
94
+ // Forms
95
+ // -------------------------
96
+ // Source: http://github.com/necolas/normalize.css
97
+
98
+ // Font size in all browsers, margin changes, misc consistency
99
+ button,
100
+ input,
101
+ select,
102
+ textarea {
103
+ font-size: 100%;
104
+ margin: 0;
105
+ vertical-align: baseline;
106
+ *vertical-align: middle;
107
+ }
108
+ button,
109
+ input {
110
+ line-height: normal; // FF3/4 have !important on line-height in UA stylesheet
111
+ *overflow: visible; // Inner spacing ie IE6/7
112
+ }
113
+ button::-moz-focus-inner,
114
+ input::-moz-focus-inner { // Inner padding and border oddities in FF3/4
115
+ border: 0;
116
+ padding: 0;
117
+ }
118
+ button,
119
+ input[type="button"],
120
+ input[type="reset"],
121
+ input[type="submit"] {
122
+ cursor: pointer; // Cursors on all buttons applied consistently
123
+ -webkit-appearance: button; // Style clicable inputs in iOS
124
+ }
125
+ input[type="search"] { // Appearance in Safari/Chrome
126
+ -webkit-appearance: textfield;
127
+ -webkit-box-sizing: content-box;
128
+ -moz-box-sizing: content-box;
129
+ box-sizing: content-box;
130
+ }
131
+ input[type="search"]::-webkit-search-decoration {
132
+ -webkit-appearance: none; // Inner-padding issues in Chrome OSX, Safari 5
133
+ }
134
+ textarea {
135
+ overflow: auto; // Remove vertical scrollbar in IE6-9
136
+ vertical-align: top; // Readability and alignment cross-browser
137
+ }
@@ -0,0 +1,110 @@
1
+ /*
2
+ * Scaffolding
3
+ * Basic and global styles for generating a grid system, structural layout, and page templates
4
+ * ------------------------------------------------------------------------------------------- */
5
+
6
+
7
+ // GRID SYSTEM
8
+ // -----------
9
+
10
+ .row {
11
+ @include clearfix();
12
+ margin-left: -1 * $gridGutterWidth;
13
+
14
+ // Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7)
15
+ // Credit to $dhg for the idea
16
+ [class*="span"] {
17
+ display: inline;
18
+ float: left;
19
+ margin-left: $gridGutterWidth;
20
+ }
21
+
22
+ // Default columns
23
+ .span1 { @include columns(1); }
24
+ .span2 { @include columns(2); }
25
+ .span3 { @include columns(3); }
26
+ .span4 { @include columns(4); }
27
+ .span5 { @include columns(5); }
28
+ .span6 { @include columns(6); }
29
+ .span7 { @include columns(7); }
30
+ .span8 { @include columns(8); }
31
+ .span9 { @include columns(9); }
32
+ .span10 { @include columns(10); }
33
+ .span11 { @include columns(11); }
34
+ .span12 { @include columns(12); }
35
+ .span13 { @include columns(13); }
36
+ .span14 { @include columns(14); }
37
+ .span15 { @include columns(15); }
38
+ .span16 { @include offset(16); }
39
+
40
+ // Offset column options
41
+ .offset1 { @include offset(1); }
42
+ .offset2 { @include offset(2); }
43
+ .offset3 { @include offset(3); }
44
+ .offset4 { @include offset(4); }
45
+ .offset5 { @include offset(5); }
46
+ .offset6 { @include offset(6); }
47
+ .offset7 { @include offset(7); }
48
+ .offset8 { @include offset(8); }
49
+ .offset9 { @include offset(9); }
50
+ .offset10 { @include offset(10); }
51
+ .offset11 { @include offset(11); }
52
+ .offset12 { @include offset(12); }
53
+
54
+ // Unique column sizes for 16-column grid
55
+ .span-one-third { width: 300px; }
56
+ .span-two-thirds { width: 620px; }
57
+ .offset-one-third { margin-left: 340px; }
58
+ .offset-two-thirds { margin-left: 660px; }
59
+ }
60
+
61
+
62
+ // STRUCTURAL LAYOUT
63
+ // -----------------
64
+
65
+ html, body {
66
+ background-color: #fff;
67
+ }
68
+ body {
69
+ margin: 0;
70
+ @include sans-serif(normal,$basefont,$baseline);
71
+ color: $gray;
72
+ }
73
+
74
+ // Container (centered, fixed-width layouts)
75
+ .container {
76
+ width: 940px;
77
+ margin: 0 auto;
78
+ }
79
+
80
+ // Fluid layouts (left aligned, with sidebar, min- & max-width content)
81
+ .container-fluid {
82
+ padding: 0 20px;
83
+ @include clearfix();
84
+ > .sidebar {
85
+ float: left;
86
+ width: 220px;
87
+ }
88
+ // TODO in v2: rename this and .popover .content to be more specific
89
+ > .content {
90
+ min-width: 700px;
91
+ max-width: 1180px;
92
+ margin-left: 240px;
93
+ }
94
+ }
95
+
96
+
97
+ // BASE STYLES
98
+ // -----------
99
+
100
+ // Links
101
+ a {
102
+ color: $linkColor;
103
+ text-decoration: none;
104
+ line-height: inherit;
105
+ font-weight: inherit;
106
+ &:hover {
107
+ color: $linkColorHover;
108
+ text-decoration: underline;
109
+ }
110
+ }