bourbon 1.4.0 → 2.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +21 -24
- data/app/assets/stylesheets/_bourbon.scss +1 -1
- data/app/assets/stylesheets/addons/_button.scss +8 -6
- data/app/assets/stylesheets/addons/_hide-text.scss +15 -0
- data/app/assets/stylesheets/css3/_animation.scss +0 -28
- data/app/assets/stylesheets/css3/_border-radius.scss +0 -10
- data/app/assets/stylesheets/css3/_inline-block.scss +0 -2
- data/app/assets/stylesheets/css3/_linear-gradient.scss +3 -1
- data/app/assets/stylesheets/css3/_radial-gradient.scss +50 -5
- data/app/assets/stylesheets/css3/_transition.scss +14 -30
- data/app/assets/stylesheets/functions/_deprecated-webkit-gradient.scss +11 -3
- data/app/assets/stylesheets/functions/_radial-gradient.scss +51 -4
- data/bourbon.gemspec +1 -0
- data/lib/bourbon.rb +1 -1
- data/lib/bourbon/version.rb +1 -1
- data/lib/tasks/install.rake +13 -4
- data/readme.md +45 -37
- metadata +21 -10
- data/app/assets/stylesheets/addons/_position.scss +0 -30
data/Gemfile.lock
CHANGED
@@ -1,45 +1,41 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bourbon (1.
|
4
|
+
bourbon (1.4.0)
|
5
5
|
sass (>= 3.1)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: http://rubygems.org/
|
9
9
|
specs:
|
10
|
-
aruba (0.4.
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
rspec (>= 2.6.0)
|
16
|
-
bcat (0.6.2)
|
17
|
-
rack (~> 1.0)
|
10
|
+
aruba (0.4.11)
|
11
|
+
childprocess (>= 0.2.3)
|
12
|
+
cucumber (>= 1.1.1)
|
13
|
+
ffi (>= 1.0.11)
|
14
|
+
rspec (>= 2.7.0)
|
18
15
|
builder (3.0.0)
|
19
|
-
childprocess (0.
|
16
|
+
childprocess (0.3.1)
|
20
17
|
ffi (~> 1.0.6)
|
21
|
-
cucumber (1.1.
|
18
|
+
cucumber (1.1.9)
|
22
19
|
builder (>= 2.1.2)
|
23
20
|
diff-lcs (>= 1.1.2)
|
24
|
-
gherkin (~> 2.
|
21
|
+
gherkin (~> 2.9.0)
|
25
22
|
json (>= 1.4.6)
|
26
23
|
term-ansicolor (>= 1.0.6)
|
27
24
|
diff-lcs (1.1.3)
|
28
25
|
ffi (1.0.11)
|
29
|
-
gherkin (2.
|
26
|
+
gherkin (2.9.0)
|
30
27
|
json (>= 1.4.6)
|
31
|
-
json (1.6.
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
rspec-
|
36
|
-
rspec-
|
37
|
-
|
38
|
-
rspec-
|
39
|
-
rspec-expectations (2.7.0)
|
28
|
+
json (1.6.5)
|
29
|
+
rake (0.9.2.2)
|
30
|
+
rspec (2.8.0)
|
31
|
+
rspec-core (~> 2.8.0)
|
32
|
+
rspec-expectations (~> 2.8.0)
|
33
|
+
rspec-mocks (~> 2.8.0)
|
34
|
+
rspec-core (2.8.0)
|
35
|
+
rspec-expectations (2.8.0)
|
40
36
|
diff-lcs (~> 1.1.2)
|
41
|
-
rspec-mocks (2.
|
42
|
-
sass (3.1.
|
37
|
+
rspec-mocks (2.8.0)
|
38
|
+
sass (3.1.15)
|
43
39
|
term-ansicolor (1.0.7)
|
44
40
|
|
45
41
|
PLATFORMS
|
@@ -48,3 +44,4 @@ PLATFORMS
|
|
48
44
|
DEPENDENCIES
|
49
45
|
aruba (~> 0.4)
|
50
46
|
bourbon!
|
47
|
+
rake
|
@@ -62,11 +62,12 @@
|
|
62
62
|
@include border-radius (3px);
|
63
63
|
@include box-shadow (inset 0 1px 0 0 $inset-shadow);
|
64
64
|
color: $color;
|
65
|
-
display: inline;
|
65
|
+
display: inline-block;
|
66
66
|
font-size: 11px;
|
67
67
|
font-weight: bold;
|
68
68
|
@include linear-gradient ($base-color, $stop-gradient);
|
69
|
-
padding:
|
69
|
+
padding: 7px 18px;
|
70
|
+
text-decoration: none;
|
70
71
|
text-shadow: 0 1px 0 $text-shadow;
|
71
72
|
-webkit-background-clip: padding-box;
|
72
73
|
|
@@ -133,11 +134,11 @@
|
|
133
134
|
@include border-radius(5px);
|
134
135
|
@include box-shadow(inset 0 1px 0 0 $inset-shadow);
|
135
136
|
color: $color;
|
136
|
-
display: inline;
|
137
|
+
display: inline-block;
|
137
138
|
font-size: 14px;
|
138
139
|
font-weight: bold;
|
139
140
|
@include linear-gradient(top, $base-color 0%, $second-stop 50%, $third-stop 50%, $fourth-stop 100%);
|
140
|
-
padding:
|
141
|
+
padding: 8px 20px;
|
141
142
|
text-align: center;
|
142
143
|
text-decoration: none;
|
143
144
|
text-shadow: 0 -1px 1px $text-shadow;
|
@@ -204,13 +205,14 @@
|
|
204
205
|
@include border-radius(16px);
|
205
206
|
@include box-shadow(inset 0 1px 0 0 $inset-shadow, 0 1px 2px 0 #b3b3b3);
|
206
207
|
color: $color;
|
207
|
-
display: inline;
|
208
|
+
display: inline-block;
|
208
209
|
font-size: 11px;
|
209
210
|
font-weight: normal;
|
210
211
|
line-height: 1;
|
211
212
|
@include linear-gradient ($base-color, $stop-gradient);
|
212
|
-
padding:
|
213
|
+
padding: 5px 16px;
|
213
214
|
text-align: center;
|
215
|
+
text-decoration: none;
|
214
216
|
text-shadow: 0 -1px 1px $text-shadow;
|
215
217
|
-webkit-background-clip: padding-box;
|
216
218
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
@mixin hide-text {
|
2
|
+
background-color: transparent;
|
3
|
+
border: 0;
|
4
|
+
color: transparent;
|
5
|
+
font: 0/0 a;
|
6
|
+
text-shadow: none;
|
7
|
+
}
|
8
|
+
|
9
|
+
// A CSS image replacement method that does not require the use of text-indent.
|
10
|
+
//
|
11
|
+
// Examples
|
12
|
+
//
|
13
|
+
// .ir {
|
14
|
+
// @include hide-text;
|
15
|
+
// }
|
@@ -141,31 +141,3 @@
|
|
141
141
|
-moz-animation-fill-mode: $full;
|
142
142
|
animation-fill-mode: $full;
|
143
143
|
}
|
144
|
-
|
145
|
-
|
146
|
-
// Deprecated
|
147
|
-
@mixin animation-basic ($name, $time: 0, $motion: ease) {
|
148
|
-
$length-of-name: length($name);
|
149
|
-
$length-of-time: length($time);
|
150
|
-
$length-of-motion: length($motion);
|
151
|
-
|
152
|
-
@if $length-of-name > 1 {
|
153
|
-
@include animation-name(zip($name));
|
154
|
-
} @else {
|
155
|
-
@include animation-name( $name);
|
156
|
-
}
|
157
|
-
|
158
|
-
@if $length-of-time > 1 {
|
159
|
-
@include animation-duration(zip($time));
|
160
|
-
} @else {
|
161
|
-
@include animation-duration( $time);
|
162
|
-
}
|
163
|
-
|
164
|
-
@if $length-of-motion > 1 {
|
165
|
-
@include animation-timing-function(zip($motion));
|
166
|
-
} @else {
|
167
|
-
@include animation-timing-function( $motion);
|
168
|
-
}
|
169
|
-
@warn "The animation-basic mixin is deprecated. Use the animation mixin instead.";
|
170
|
-
}
|
171
|
-
|
@@ -1,8 +1,6 @@
|
|
1
1
|
@mixin border-radius ($radii) {
|
2
2
|
-webkit-border-radius: $radii;
|
3
3
|
-moz-border-radius: $radii;
|
4
|
-
-ms-border-radius: $radii;
|
5
|
-
-o-border-radius: $radii;
|
6
4
|
border-radius: $radii;
|
7
5
|
}
|
8
6
|
|
@@ -10,8 +8,6 @@
|
|
10
8
|
-webkit-border-top-left-radius: $radii;
|
11
9
|
-moz-border-top-left-radius: $radii;
|
12
10
|
-moz-border-radius-topleft: $radii;
|
13
|
-
-ms-border-top-left-radius: $radii;
|
14
|
-
-o-border-top-left-radius: $radii;
|
15
11
|
border-top-left-radius: $radii;
|
16
12
|
}
|
17
13
|
|
@@ -19,8 +15,6 @@
|
|
19
15
|
-webkit-border-top-right-radius: $radii;
|
20
16
|
-moz-border-top-right-radius: $radii;
|
21
17
|
-moz-border-radius-topright: $radii;
|
22
|
-
-ms-border-top-right-radius: $radii;
|
23
|
-
-o-border-top-right-radius: $radii;
|
24
18
|
border-top-right-radius: $radii;
|
25
19
|
}
|
26
20
|
|
@@ -28,8 +22,6 @@
|
|
28
22
|
-webkit-border-bottom-left-radius: $radii;
|
29
23
|
-moz-border-bottom-left-radius: $radii;
|
30
24
|
-moz-border-radius-bottomleft: $radii;
|
31
|
-
-ms-border-bottom-left-radius: $radii;
|
32
|
-
-o-border-bottom-left-radius: $radii;
|
33
25
|
border-bottom-left-radius: $radii;
|
34
26
|
}
|
35
27
|
|
@@ -37,8 +29,6 @@
|
|
37
29
|
-webkit-border-bottom-right-radius: $radii;
|
38
30
|
-moz-border-bottom-right-radius: $radii;
|
39
31
|
-moz-border-radius-bottomright: $radii;
|
40
|
-
-ms-border-bottom-right-radius: $radii;
|
41
|
-
-o-border-bottom-right-radius: $radii;
|
42
32
|
border-bottom-right-radius: $radii;
|
43
33
|
}
|
44
34
|
|
@@ -3,6 +3,8 @@
|
|
3
3
|
$G5: false, $G6: false,
|
4
4
|
$G7: false, $G8: false,
|
5
5
|
$G9: false, $G10: false,
|
6
|
+
$deprecated-pos1: left top,
|
7
|
+
$deprecated-pos2: left bottom,
|
6
8
|
$fallback: false) {
|
7
9
|
// Detect what type of value exists in $pos
|
8
10
|
$pos-type: type-of(nth($pos, 1));
|
@@ -25,7 +27,7 @@
|
|
25
27
|
}
|
26
28
|
|
27
29
|
background-color: $fallback-color;
|
28
|
-
background-image: deprecated-webkit-gradient(linear, $full); // Safari <= 5.0
|
30
|
+
background-image: deprecated-webkit-gradient(linear, $deprecated-pos1, $deprecated-pos2, $full); // Safari <= 5.0
|
29
31
|
background-image: -webkit-linear-gradient($pos, $full); // Safari 5.1+, Chrome
|
30
32
|
background-image: -moz-linear-gradient($pos, $full);
|
31
33
|
background-image: -ms-linear-gradient($pos, $full);
|
@@ -1,24 +1,69 @@
|
|
1
1
|
// Requires Sass 3.1+
|
2
|
-
@mixin radial-gradient($
|
3
|
-
$G1, $G2,
|
2
|
+
@mixin radial-gradient($G1, $G2,
|
4
3
|
$G3: false, $G4: false,
|
5
4
|
$G5: false, $G6: false,
|
6
5
|
$G7: false, $G8: false,
|
7
6
|
$G9: false, $G10: false,
|
7
|
+
$pos: 50% 50%,
|
8
|
+
$shape-size: ellipse cover,
|
9
|
+
$deprecated-pos1: center center,
|
10
|
+
$deprecated-pos2: center center,
|
11
|
+
$deprecated-radius1: 0,
|
12
|
+
$deprecated-radius2: 460,
|
8
13
|
$fallback: false) {
|
9
14
|
|
15
|
+
@each $value in $G1, $G2 {
|
16
|
+
$first-val: nth($value, 1);
|
17
|
+
$pos-type: type-of($first-val);
|
18
|
+
|
19
|
+
@if ($pos-type != color) or ($first-val != "transparent") {
|
20
|
+
@if ($pos-type == number)
|
21
|
+
or ($first-val == "center")
|
22
|
+
or ($first-val == "top")
|
23
|
+
or ($first-val == "right")
|
24
|
+
or ($first-val == "bottom")
|
25
|
+
or ($first-val == "left") {
|
26
|
+
|
27
|
+
$pos: $value;
|
28
|
+
|
29
|
+
@if $pos == $G1 {
|
30
|
+
$G1: false;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
@else if
|
35
|
+
($first-val == "ellipse")
|
36
|
+
or ($first-val == "circle")
|
37
|
+
or ($first-val == "closest-side")
|
38
|
+
or ($first-val == "closest-corner")
|
39
|
+
or ($first-val == "farthest-side")
|
40
|
+
or ($first-val == "farthest-corner")
|
41
|
+
or ($first-val == "contain")
|
42
|
+
or ($first-val == "cover") {
|
43
|
+
|
44
|
+
$shape-size: $value;
|
45
|
+
|
46
|
+
@if $value == $G1 {
|
47
|
+
$G1: false;
|
48
|
+
}
|
49
|
+
|
50
|
+
@else if $value == $G2 {
|
51
|
+
$G2: false;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
10
57
|
$full: compact($G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10);
|
11
58
|
|
12
|
-
// Set $G1 as the default fallback color
|
13
59
|
$fallback-color: nth($G1, 1);
|
14
60
|
|
15
|
-
// If $fallback is a color use that color as the fallback color
|
16
61
|
@if (type-of($fallback) == color) or ($fallback == "transparent") {
|
17
62
|
$fallback-color: $fallback;
|
18
63
|
}
|
19
64
|
|
20
65
|
background-color: $fallback-color;
|
21
|
-
background-image:
|
66
|
+
background-image: deprecated-webkit-gradient(radial, $deprecated-pos1, $deprecated-pos2, $full, $deprecated-radius1, $deprecated-radius2); // Safari <= 5.0
|
22
67
|
background-image: -webkit-radial-gradient($pos, $shape-size, $full);
|
23
68
|
background-image: -moz-radial-gradient($pos, $shape-size, $full);
|
24
69
|
background-image: -ms-radial-gradient($pos, $shape-size, $full);
|
@@ -3,40 +3,24 @@
|
|
3
3
|
// @include transition ((opacity, width), (1.0s, 2.0s), ease-in, (0, 2s));
|
4
4
|
// @include transition ($property:(opacity, width), $delay: (1.5s, 2.5s));
|
5
5
|
|
6
|
-
@mixin transition ($
|
7
|
-
|
8
|
-
|
9
|
-
$
|
10
|
-
$
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
@if $length-of-property > 1 {
|
15
|
-
@include transition-property(zip($property)); }
|
16
|
-
@else {
|
17
|
-
@include transition-property( $property);
|
18
|
-
}
|
19
|
-
|
20
|
-
@if $length-of-duration > 1 {
|
21
|
-
@include transition-duration(zip($duration)); }
|
22
|
-
@else {
|
23
|
-
@include transition-duration( $duration);
|
24
|
-
}
|
25
|
-
|
26
|
-
@if $length-of-timing-function > 1 {
|
27
|
-
@include transition-timing-function(zip($timing-function)); }
|
28
|
-
@else {
|
29
|
-
@include transition-timing-function( $timing-function);
|
30
|
-
}
|
6
|
+
@mixin transition ($prop-1: all 0.15s ease-out 0,
|
7
|
+
$prop-2: false, $prop-3: false,
|
8
|
+
$prop-4: false, $prop-5: false,
|
9
|
+
$prop-6: false, $prop-7: false,
|
10
|
+
$prop-8: false, $prop-9: false)
|
11
|
+
{
|
12
|
+
$full: compact($prop-1, $prop-2, $prop-3, $prop-4, $prop-5,
|
13
|
+
$prop-6, $prop-7, $prop-8, $prop-9);
|
31
14
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
15
|
+
-webkit-transition: $full;
|
16
|
+
-moz-transition: $full;
|
17
|
+
-ms-transition: $full;
|
18
|
+
-o-transition: $full;
|
19
|
+
transition: $full;
|
37
20
|
}
|
38
21
|
|
39
22
|
|
23
|
+
|
40
24
|
@mixin transition-property ($prop-1: all,
|
41
25
|
$prop-2: false, $prop-3: false,
|
42
26
|
$prop-4: false, $prop-5: false,
|
@@ -1,6 +1,9 @@
|
|
1
1
|
// Render Deprecated Webkit Gradient - Linear || Radial
|
2
2
|
//************************************************************************//
|
3
|
-
@function deprecated-webkit-gradient($type,
|
3
|
+
@function deprecated-webkit-gradient($type,
|
4
|
+
$deprecated-pos1, $deprecated-pos2,
|
5
|
+
$full,
|
6
|
+
$deprecated-radius1: false, $deprecated-radius2: false) {
|
4
7
|
$gradient-list: ();
|
5
8
|
$gradient: false;
|
6
9
|
$full-length: length($full);
|
@@ -14,23 +17,28 @@
|
|
14
17
|
$color-stop: color-stop(nth($gradient, 2), nth($gradient, 1));
|
15
18
|
$gradient-list: join($gradient-list, $color-stop, comma);
|
16
19
|
}
|
20
|
+
|
17
21
|
@else {
|
18
22
|
@if $i == $full-length {
|
19
23
|
$percentage: 100%;
|
20
24
|
}
|
25
|
+
|
21
26
|
@else {
|
22
27
|
$percentage: ($i - 1) * (100 / ($full-length - 1)) + "%";
|
23
28
|
}
|
29
|
+
|
24
30
|
$color-stop: color-stop(unquote($percentage), $gradient);
|
25
31
|
$gradient-list: join($gradient-list, $color-stop, comma);
|
26
32
|
}
|
27
33
|
}
|
28
34
|
|
29
35
|
@if $type == radial {
|
30
|
-
$gradient: -webkit-gradient(radial,
|
36
|
+
$gradient: -webkit-gradient(radial, $deprecated-pos1, $deprecated-radius1, $deprecated-pos2, $deprecated-radius2, $gradient-list);
|
31
37
|
}
|
38
|
+
|
32
39
|
@else if $type == linear {
|
33
|
-
$gradient: -webkit-gradient(linear,
|
40
|
+
$gradient: -webkit-gradient(linear, $deprecated-pos1, $deprecated-pos2, $gradient-list);
|
34
41
|
}
|
42
|
+
|
35
43
|
@return $gradient;
|
36
44
|
}
|
@@ -1,10 +1,58 @@
|
|
1
1
|
// This function is required and used by the background-image mixin.
|
2
|
-
@function radial-gradient($
|
3
|
-
$G1, $G2,
|
2
|
+
@function radial-gradient($G1, $G2,
|
4
3
|
$G3: false, $G4: false,
|
5
4
|
$G5: false, $G6: false,
|
6
5
|
$G7: false, $G8: false,
|
7
|
-
$G9: false, $G10: false
|
6
|
+
$G9: false, $G10: false,
|
7
|
+
$pos: 50% 50%,
|
8
|
+
$shape-size: ellipse cover,
|
9
|
+
$deprecated-pos1: center center,
|
10
|
+
$deprecated-pos2: center center,
|
11
|
+
$deprecated-radius1: 0,
|
12
|
+
$deprecated-radius2: 50,
|
13
|
+
$fallback: false) {
|
14
|
+
|
15
|
+
@each $value in $G1, $G2 {
|
16
|
+
$first-val: nth($value, 1);
|
17
|
+
$pos-type: type-of($first-val);
|
18
|
+
|
19
|
+
@if ($pos-type != color) or ($first-val != "transparent") {
|
20
|
+
@if ($pos-type == number)
|
21
|
+
or ($first-val == "center")
|
22
|
+
or ($first-val == "top")
|
23
|
+
or ($first-val == "right")
|
24
|
+
or ($first-val == "bottom")
|
25
|
+
or ($first-val == "left") {
|
26
|
+
|
27
|
+
$pos: $value;
|
28
|
+
|
29
|
+
@if $pos == $G1 {
|
30
|
+
$G1: false;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
@else if
|
35
|
+
($first-val == "ellipse")
|
36
|
+
or ($first-val == "circle")
|
37
|
+
or ($first-val == "closest-side")
|
38
|
+
or ($first-val == "closest-corner")
|
39
|
+
or ($first-val == "farthest-side")
|
40
|
+
or ($first-val == "farthest-corner")
|
41
|
+
or ($first-val == "contain")
|
42
|
+
or ($first-val == "cover") {
|
43
|
+
|
44
|
+
$shape-size: $value;
|
45
|
+
|
46
|
+
@if $value == $G1 {
|
47
|
+
$G1: false;
|
48
|
+
}
|
49
|
+
|
50
|
+
@else if $value == $G2 {
|
51
|
+
$G2: false;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
8
56
|
|
9
57
|
$type: radial;
|
10
58
|
$gradient: compact($pos, $shape-size, $G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10);
|
@@ -12,4 +60,3 @@
|
|
12
60
|
|
13
61
|
@return $type-gradient;
|
14
62
|
}
|
15
|
-
|
data/bourbon.gemspec
CHANGED
data/lib/bourbon.rb
CHANGED
data/lib/bourbon/version.rb
CHANGED
data/lib/tasks/install.rake
CHANGED
@@ -1,11 +1,20 @@
|
|
1
1
|
# Needed for pre-3.1.
|
2
|
+
|
3
|
+
require "fileutils"
|
4
|
+
require "find"
|
5
|
+
|
2
6
|
namespace :bourbon do
|
3
7
|
desc "Move files to the Rails assets directory."
|
4
8
|
task :install, [:sass_path] do |t, args|
|
5
|
-
args.with_defaults
|
9
|
+
args.with_defaults(:sass_path => 'public/stylesheets/sass')
|
6
10
|
source_root = File.expand_path(File.join(File.dirname(__FILE__), '..', '..'))
|
7
|
-
|
8
|
-
|
9
|
-
|
11
|
+
FileUtils.mkdir_p("#{Rails.root}/#{args.sass_path}/bourbon")
|
12
|
+
FileUtils.cp_r("#{source_root}/app/assets/stylesheets/.", "#{Rails.root}/#{args.sass_path}/bourbon", { :preserve => true })
|
13
|
+
Find.find("#{Rails.root}/#{args.sass_path}/bourbon") do |path|
|
14
|
+
if path.end_with?(".css.scss")
|
15
|
+
path_without_css_extension = path.gsub(/\.css\.scss$/, ".scss")
|
16
|
+
FileUtils.mv(path, path_without_css_extension)
|
17
|
+
end
|
18
|
+
end
|
10
19
|
end
|
11
20
|
end
|
data/readme.md
CHANGED
@@ -1,10 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
[![Bourbon Sass Mixin Library](http://thoughtbot.com/bourbon/images/bourbon-logo.png)](http://thoughtbot.com/bourbon)
|
2
|
+
# A simple and lightweight mixin library for Sass
|
3
|
+
Bourbon is a comprehensive library of sass mixins that are designed to be simple
|
4
|
+
and easy to use. No configuration required. The mixins aim to be as vanilla as
|
5
|
+
possible, meaning they should be as close to the original CSS syntax as possible.
|
6
|
+
|
5
7
|
The mixins contain vendor specific prefixes for all CSS3 properties for support
|
6
8
|
amongst modern browsers. The prefixes also ensure graceful degradation for older
|
7
|
-
browsers that support only CSS3 prefixed properties.
|
9
|
+
browsers that support only CSS3 prefixed properties. Bourbon uses SCSS syntax.
|
10
|
+
|
11
|
+
#[Documentation & Demo](http://thoughtbot.com/bourbon)
|
8
12
|
|
9
13
|
# Requirements
|
10
14
|
Sass 3.1+
|
@@ -18,10 +22,7 @@ Then run:
|
|
18
22
|
|
19
23
|
$ bundle install
|
20
24
|
|
21
|
-
Bourbon On [RubyGems](https://rubygems.org/gems/bourbon)
|
22
|
-
|
23
25
|
## Rails 3.1.x
|
24
|
-
|
25
26
|
Rename application.css to application.css.scss:
|
26
27
|
|
27
28
|
mv app/assets/stylesheets/application.css app/assets/stylesheets/application.css.scss
|
@@ -41,9 +42,9 @@ Import all additional stylesheets from your app/assets/stylesheets directory und
|
|
41
42
|
@import "home";
|
42
43
|
@import "users";
|
43
44
|
|
44
|
-
## Rails 3.0.x
|
45
|
-
For Rails
|
46
|
-
This will copy the Sass files into your project's public/stylesheets/sass directory.
|
45
|
+
## Rails 3.0.x
|
46
|
+
For Rails 3.0.x you must run the installation rake task. You should run this task every time a new version of Bourbon is released.
|
47
|
+
This will copy the Sass files into your project's `public/stylesheets/sass` directory.
|
47
48
|
|
48
49
|
rake bourbon:install
|
49
50
|
|
@@ -55,7 +56,7 @@ Import the mixins at the beginning of your stylesheet
|
|
55
56
|
|
56
57
|
rake bourbon:install[app/stylesheets]
|
57
58
|
|
58
|
-
#
|
59
|
+
# Rails 2.3 or a non-Rails project (static site, jekyll, wordpress, etc...)
|
59
60
|
Bourbon includes an easy way to generate a directory with all the necessary files.
|
60
61
|
Install the bourbon gem:
|
61
62
|
|
@@ -96,18 +97,7 @@ Bourbon aims to provide support for CSS3 properties that are not yet fully suppo
|
|
96
97
|
|
97
98
|
*@ denotes a mixin and must be prefaced with @include*
|
98
99
|
|
99
|
-
|
100
|
-
--------------------------------
|
101
|
-
compact(*args)
|
102
|
-
modular-scale(*args)
|
103
|
-
golden-ratio(*args)
|
104
|
-
grid-width(*args)
|
105
|
-
linear-gradient(*args)
|
106
|
-
radial-gradient(*args)
|
107
|
-
shade(*args)
|
108
|
-
tint(*args)
|
109
|
-
|
110
|
-
#Mixins
|
100
|
+
Mixins
|
111
101
|
--------------------------------
|
112
102
|
animation
|
113
103
|
@ animation(*args)
|
@@ -128,11 +118,11 @@ Bourbon aims to provide support for CSS3 properties that are not yet fully suppo
|
|
128
118
|
border-radius
|
129
119
|
@ border-radius(*args)
|
130
120
|
@ border-radius-top(*args)
|
131
|
-
|
132
|
-
|
121
|
+
@ border-radius-top-left(*args)
|
122
|
+
@ border-radius-top-right(*args)
|
133
123
|
@ border-radius-bottom(*args)
|
134
|
-
|
135
|
-
|
124
|
+
@ border-radius-bottom-left(*args)
|
125
|
+
@ border-radius-bottom-right(*args)
|
136
126
|
@ border-radius-left(*args)
|
137
127
|
@ border-radius-right(*args)
|
138
128
|
|
@@ -145,9 +135,9 @@ Bourbon aims to provide support for CSS3 properties that are not yet fully suppo
|
|
145
135
|
@column-fill(*args)
|
146
136
|
@column-gap(*args)
|
147
137
|
@column-rule(*args)
|
148
|
-
|
149
|
-
|
150
|
-
|
138
|
+
@column-rule-color(*args)
|
139
|
+
@column-rule-style(*args)
|
140
|
+
@column-rule-width(*args)
|
151
141
|
@column-span(*args)
|
152
142
|
@column-width(*args)
|
153
143
|
|
@@ -166,8 +156,10 @@ Bourbon aims to provide support for CSS3 properties that are not yet fully suppo
|
|
166
156
|
@ inline-block
|
167
157
|
@ linear-gradient(*args)
|
168
158
|
@ radial-gradient(*args)
|
169
|
-
|
170
|
-
|
159
|
+
|
160
|
+
transform
|
161
|
+
@ transform(*args)
|
162
|
+
@ transform-origin(*args)
|
171
163
|
|
172
164
|
transition
|
173
165
|
@ transition(*args)
|
@@ -176,13 +168,27 @@ Bourbon aims to provide support for CSS3 properties that are not yet fully suppo
|
|
176
168
|
@ transition-property(*args)
|
177
169
|
@ transition-timing-function(*args)
|
178
170
|
|
179
|
-
|
171
|
+
@ user-select
|
172
|
+
|
173
|
+
Functions
|
180
174
|
--------------------------------
|
175
|
+
compact(*args)
|
176
|
+
flex-grid(*args)
|
177
|
+
golden-ratio(*args)
|
178
|
+
grid-width(*args)
|
179
|
+
linear-gradient(*args)
|
180
|
+
radial-gradient(*args)
|
181
|
+
shade(*args)
|
182
|
+
tint(*args)
|
183
|
+
|
184
|
+
Addons
|
185
|
+
-------------------------------
|
181
186
|
@ button(*args)
|
182
187
|
@ clearfix
|
183
|
-
@
|
188
|
+
@ hide-text
|
184
189
|
|
185
|
-
|
190
|
+
HTML5 Inputs
|
191
|
+
#{$all-text-inputs}
|
186
192
|
|
187
193
|
font-family
|
188
194
|
$georgia
|
@@ -198,7 +204,6 @@ Bourbon aims to provide support for CSS3 properties that are not yet fully suppo
|
|
198
204
|
* = quad, cubic, quart, quint, sine, expo, circ, back
|
199
205
|
|
200
206
|
|
201
|
-
|
202
207
|
## Help Out
|
203
208
|
|
204
209
|
Currently the project is a work in progress. Feel free to help out.
|
@@ -213,6 +218,7 @@ If the answer is yes, there is a high chance the mixin will be accepted via a pu
|
|
213
218
|
|
214
219
|
*Bourbon does not intend to support IE filters.*
|
215
220
|
|
221
|
+
|
216
222
|
Resources for checking browser support: [MDN - Moz Dev Network](https://developer.mozilla.org/en-US/), [Mozilla CSS Extensions](https://developer.mozilla.org/en/CSS_Reference/Mozilla_Extensions), [Webkit CSS Properties](http://css-infos.net/properties/webkit.php), [Firefox CSS Properties](http://css-infos.net/properties/firefox.php), [MSDN - Microsoft Dev Network](http://msdn.microsoft.com/en-us/library/ms531207(v=VS.85).aspx)
|
217
223
|
|
218
224
|
Credits
|
@@ -220,6 +226,8 @@ Credits
|
|
220
226
|
|
221
227
|
![thoughtbot](http://thoughtbot.com/images/tm/logo.png)
|
222
228
|
|
229
|
+
Got questions? Need help? Tweet at [@phillapier](http://twitter.com/phillapier).
|
230
|
+
|
223
231
|
Bourbon is maintained and funded by [thoughtbot, inc](http://thoughtbot.com/community)
|
224
232
|
|
225
233
|
The names and logos for thoughtbot are trademarks of thoughtbot, inc.
|
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bourbon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
5
|
-
prerelease:
|
4
|
+
version: 2.0.0.rc1
|
5
|
+
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Phil LaPier
|
@@ -19,11 +19,11 @@ authors:
|
|
19
19
|
autorequire:
|
20
20
|
bindir: bin
|
21
21
|
cert_chain: []
|
22
|
-
date: 2012-
|
22
|
+
date: 2012-03-16 00:00:00.000000000 Z
|
23
23
|
dependencies:
|
24
24
|
- !ruby/object:Gem::Dependency
|
25
25
|
name: sass
|
26
|
-
requirement: &
|
26
|
+
requirement: &70142811730920 !ruby/object:Gem::Requirement
|
27
27
|
none: false
|
28
28
|
requirements:
|
29
29
|
- - ! '>='
|
@@ -31,10 +31,10 @@ dependencies:
|
|
31
31
|
version: '3.1'
|
32
32
|
type: :runtime
|
33
33
|
prerelease: false
|
34
|
-
version_requirements: *
|
34
|
+
version_requirements: *70142811730920
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: aruba
|
37
|
-
requirement: &
|
37
|
+
requirement: &70142811730420 !ruby/object:Gem::Requirement
|
38
38
|
none: false
|
39
39
|
requirements:
|
40
40
|
- - ~>
|
@@ -42,7 +42,18 @@ dependencies:
|
|
42
42
|
version: '0.4'
|
43
43
|
type: :development
|
44
44
|
prerelease: false
|
45
|
-
version_requirements: *
|
45
|
+
version_requirements: *70142811730420
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rake
|
48
|
+
requirement: &70142811730040 !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: *70142811730040
|
46
57
|
description: ! 'The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive
|
47
58
|
framework of
|
48
59
|
|
@@ -73,8 +84,8 @@ files:
|
|
73
84
|
- app/assets/stylesheets/addons/_button.scss
|
74
85
|
- app/assets/stylesheets/addons/_clearfix.scss
|
75
86
|
- app/assets/stylesheets/addons/_font-family.scss
|
87
|
+
- app/assets/stylesheets/addons/_hide-text.scss
|
76
88
|
- app/assets/stylesheets/addons/_html5-input-types.scss
|
77
|
-
- app/assets/stylesheets/addons/_position.scss
|
78
89
|
- app/assets/stylesheets/addons/_timing-functions.scss
|
79
90
|
- app/assets/stylesheets/css3/_animation.scss
|
80
91
|
- app/assets/stylesheets/css3/_appearance.scss
|
@@ -131,9 +142,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
131
142
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
143
|
none: false
|
133
144
|
requirements:
|
134
|
-
- - ! '
|
145
|
+
- - ! '>'
|
135
146
|
- !ruby/object:Gem::Version
|
136
|
-
version:
|
147
|
+
version: 1.3.1
|
137
148
|
requirements: []
|
138
149
|
rubyforge_project: bourbon
|
139
150
|
rubygems_version: 1.8.10
|
@@ -1,30 +0,0 @@
|
|
1
|
-
@mixin position ($position: relative, $coordinates: 0 0 0 0) {
|
2
|
-
|
3
|
-
@if type-of($position) == list {
|
4
|
-
$coordinates: $position;
|
5
|
-
$position: relative;
|
6
|
-
}
|
7
|
-
|
8
|
-
$top: nth($coordinates, 1);
|
9
|
-
$right: nth($coordinates, 2);
|
10
|
-
$bottom: nth($coordinates, 3);
|
11
|
-
$left: nth($coordinates, 4);
|
12
|
-
|
13
|
-
position: $position;
|
14
|
-
|
15
|
-
@if not(unitless($top)) {
|
16
|
-
top: $top;
|
17
|
-
}
|
18
|
-
|
19
|
-
@if not(unitless($right)) {
|
20
|
-
right: $right;
|
21
|
-
}
|
22
|
-
|
23
|
-
@if not(unitless($bottom)) {
|
24
|
-
bottom: $bottom;
|
25
|
-
}
|
26
|
-
|
27
|
-
@if not(unitless($left)) {
|
28
|
-
left: $left;
|
29
|
-
}
|
30
|
-
}
|