compass-bootstrap 0.1.2 → 0.1.3
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.
- data/.gitignore +4 -0
- data/README.mkdn +112 -21
- data/lib/compass-bootstrap.rb +6 -1
- data/lib/compass-bootstrap/rails.rb +7 -0
- data/lib/compass-bootstrap/rails/engine.rb +7 -0
- data/lib/compass-bootstrap/version.rb +1 -1
- data/stylesheets/compass-bootstrap/_compass_bootstrap.scss +5 -2
- data/stylesheets/compass-bootstrap/_forms.scss +139 -67
- data/stylesheets/compass-bootstrap/_mixins.scss +210 -0
- data/stylesheets/compass-bootstrap/_patterns.scss +331 -146
- data/stylesheets/compass-bootstrap/_reset.scss +6 -2
- data/stylesheets/compass-bootstrap/_scaffolding.scss +89 -62
- data/stylesheets/compass-bootstrap/_tables.scss +35 -12
- data/stylesheets/compass-bootstrap/_type.scss +7 -8
- data/stylesheets/compass-bootstrap/_variables.scss +60 -0
- data/vendor/assets/javascripts/bootstrap-alerts.js +104 -0
- data/vendor/assets/javascripts/bootstrap-dropdown.js +50 -0
- data/vendor/assets/javascripts/bootstrap-modal.js +227 -0
- data/vendor/assets/javascripts/bootstrap-popover.js +77 -0
- data/vendor/assets/javascripts/bootstrap-scrollspy.js +105 -0
- data/vendor/assets/javascripts/bootstrap-tabs.js +62 -0
- data/vendor/assets/javascripts/bootstrap-twipsy.js +307 -0
- data/vendor/assets/stylesheets/compass-bootstrap/_compass_bootstrap.scss +29 -0
- data/{templates → vendor/assets/stylesheets}/compass-bootstrap/_forms.scss +139 -67
- data/vendor/assets/stylesheets/compass-bootstrap/_mixins.scss +210 -0
- data/{templates → vendor/assets/stylesheets}/compass-bootstrap/_patterns.scss +331 -146
- data/{templates → vendor/assets/stylesheets}/compass-bootstrap/_reset.scss +6 -2
- data/vendor/assets/stylesheets/compass-bootstrap/_scaffolding.scss +137 -0
- data/{templates → vendor/assets/stylesheets}/compass-bootstrap/_tables.scss +35 -12
- data/{templates → vendor/assets/stylesheets}/compass-bootstrap/_type.scss +7 -8
- data/vendor/assets/stylesheets/compass-bootstrap/_variables.scss +60 -0
- data/{templates → vendor/assets/stylesheets}/compass-bootstrap/compass_bootstrap.scss +5 -2
- data/vendor/assets/stylesheets/compass-bootstrap/manifest.rb +20 -0
- metadata +50 -61
- data/stylesheets/compass-bootstrap/_preboot.scss +0 -276
- data/templates/compass-bootstrap/_preboot.scss +0 -292
- data/templates/compass-bootstrap/_scaffolding.scss +0 -110
- data/templates/compass-bootstrap/manifest.rb +0 -12
@@ -1,276 +0,0 @@
|
|
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
|
-
}
|
@@ -1,292 +0,0 @@
|
|
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
|
-
@mixin button($color: #ffffff, $textColor: #333, $textShadow: 0 1px 1px rgba(255,255,255,.75), $fontSize: 13px, $padding: 5px 14px 6px, $rounded: 4px) {
|
264
|
-
display: inline-block;
|
265
|
-
@include gradientBar($color,darken($color, 10%));
|
266
|
-
padding: $padding;
|
267
|
-
text-shadow: $textShadow;
|
268
|
-
color: $textColor;
|
269
|
-
font-size: $fontSize;
|
270
|
-
line-height: normal;
|
271
|
-
@include border-radius(6px);
|
272
|
-
$shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
273
|
-
@include bt-box-shadow($shadow);
|
274
|
-
&:hover {
|
275
|
-
background-position: 0 -15px;
|
276
|
-
color: $textColor;
|
277
|
-
text-decoration: none;
|
278
|
-
}
|
279
|
-
}
|
280
|
-
|
281
|
-
// Reset filters for IE
|
282
|
-
@mixin reset-filter() {
|
283
|
-
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
284
|
-
}
|
285
|
-
|
286
|
-
// Opacity
|
287
|
-
@mixin bt-opacity($opacity: 100) {
|
288
|
-
filter: alpha(opacity=$opacity);
|
289
|
-
-khtml-opacity: $opacity / 100;
|
290
|
-
-moz-opacity: $opacity / 100;
|
291
|
-
opacity: $opacity / 100;
|
292
|
-
}
|