bourbon 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/stylesheets/_bourbon.css.scss +1 -0
- data/app/assets/stylesheets/addons/_animation-keyframes.css.scss +28 -0
- data/app/assets/stylesheets/css3/_background-image.css.scss +2 -1
- data/app/assets/stylesheets/css3/_linear-gradient.css.scss +1 -1
- data/app/assets/stylesheets/functions/_linear-gradient.css.scss +2 -9
- data/readme.md +25 -11
- metadata +4 -3
@@ -0,0 +1,28 @@
|
|
1
|
+
// Keyframes for Animations
|
2
|
+
|
3
|
+
// Fade-In animation
|
4
|
+
@mixin fade-in {
|
5
|
+
0% {
|
6
|
+
opacity: 0;
|
7
|
+
}
|
8
|
+
100% {
|
9
|
+
opacity: 1;
|
10
|
+
}
|
11
|
+
}
|
12
|
+
@-webkit-keyframes fade-in { @include fade-in; }
|
13
|
+
@-moz-keyframes fade-in { @include fade-in; }
|
14
|
+
@keyframes fade-in { @include fade-in; }
|
15
|
+
|
16
|
+
|
17
|
+
// Fade-out animation
|
18
|
+
@mixin fade-out {
|
19
|
+
0% {
|
20
|
+
opacity: 1;
|
21
|
+
}
|
22
|
+
100% {
|
23
|
+
opacity: 0;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
@-webkit-keyframes fade-out { @include fade-out; }
|
27
|
+
@-moz-keyframes fade-out { @include fade-out; }
|
28
|
+
@keyframes fade-out { @include fade-out; }
|
@@ -57,7 +57,8 @@
|
|
57
57
|
$vendor-gradients: -#{$vendor}-linear-gradient($gradients);
|
58
58
|
}
|
59
59
|
@else if $vendor == false {
|
60
|
-
$vendor-gradients: linear-gradient($gradients);
|
60
|
+
$vendor-gradients: "linear-gradient(#{$gradients})";
|
61
|
+
$vendor-gradients: unquote($vendor-gradients);
|
61
62
|
}
|
62
63
|
@return $vendor-gradients;
|
63
64
|
}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
$pos-type: type-of(nth($pos, 1));
|
9
9
|
|
10
10
|
// If $pos is missing from mixin, reassign vars and add default position
|
11
|
-
@if $pos-type == color or transparent
|
11
|
+
@if ($pos-type == color) or (nth($pos, 1) == "transparent") {
|
12
12
|
$G10: $G9; $G9: $G8; $G8: $G7; $G7: $G6; $G6: $G5;
|
13
13
|
$G5: $G4; $G4: $G3; $G3: $G2; $G2: $G1; $G1: $pos;
|
14
14
|
$pos: top; // Default position
|
@@ -8,7 +8,7 @@
|
|
8
8
|
$pos-type: type-of(nth($pos, 1));
|
9
9
|
|
10
10
|
// If $pos is missing from mixin, reassign vars and add default position
|
11
|
-
@if $pos-type == color or transparent
|
11
|
+
@if ($pos-type == color) or (nth($pos, 1) == "transparent") {
|
12
12
|
$G10: $G9; $G9: $G8; $G8: $G7; $G7: $G6; $G6: $G5;
|
13
13
|
$G5: $G4; $G4: $G3; $G3: $G2; $G2: $G1; $G1: $pos;
|
14
14
|
$pos: top; // Default position
|
@@ -16,13 +16,6 @@
|
|
16
16
|
|
17
17
|
$full: compact($G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10);
|
18
18
|
|
19
|
-
|
20
|
-
@if type-of(nth($full, 1)) != color or transparent {
|
21
|
-
@return $full;
|
22
|
-
}
|
19
|
+
@return join($pos, $full, comma);
|
23
20
|
|
24
|
-
//Else add the default position
|
25
|
-
@else {
|
26
|
-
@return join($pos, $full, comma);
|
27
|
-
}
|
28
21
|
}
|
data/readme.md
CHANGED
@@ -271,27 +271,39 @@ Shade is a mix of a color with black. Shade takes a color and a percent argument
|
|
271
271
|
|
272
272
|
##Add-ons
|
273
273
|
|
274
|
+
###Animation-Keyframes
|
275
|
+
|
276
|
+
Animation-keyframes are provided for quick out-of-the-box animations. Two animation-keyframes are provided: fade-in, fade-out. These animations can be called using the *animation-name* mixin; alternatively the *animation-basic* mixin can be used. Supports Webkit browsers and Mozilla 5.0+.
|
277
|
+
|
278
|
+
div.fade-in {
|
279
|
+
@include animation-name(fade-in);
|
280
|
+
}
|
281
|
+
|
282
|
+
div.fade-out {
|
283
|
+
@include animation-basic(fade-out, 2.0s, ease-in);
|
284
|
+
opacity: 0;
|
285
|
+
}
|
286
|
+
|
287
|
+
|
274
288
|
###Buttons
|
275
289
|
|
276
|
-
The button add-on provides well-designed buttons with a single line in your CSS.
|
277
|
-
The mixin
|
290
|
+
The button add-on provides well-designed buttons with a single line in your CSS.
|
291
|
+
The mixin supports a style parameter and an optional color argument. The available styles are **"simple"** (default), **"shiny"**, and **"pill"**.
|
278
292
|
|
279
|
-
button
|
280
|
-
input[type="button"] {
|
293
|
+
# The mixin can be called with no arguments, which will render a blue button with the "simple" style.
|
294
|
+
button, input[type="button"] {
|
281
295
|
@include button;
|
282
296
|
}
|
283
297
|
|
284
|
-
|
285
|
-
|
286
|
-
button,
|
287
|
-
input[type="button"] {
|
298
|
+
# Pass a style argument
|
299
|
+
button, input[type="button"] {
|
288
300
|
@include button(shiny);
|
289
301
|
}
|
290
302
|
|
291
|
-
|
303
|
+
Create beautiful buttons by defining a style and color argument; using a single color, the mixin calculates the gradient, borders, box shadow, text shadow and text color of the button. The mixin will change the text to be light when on a dark background, and dark when on a light background.
|
292
304
|
|
293
|
-
|
294
|
-
input[type="button"] {
|
305
|
+
# Style + color arguments
|
306
|
+
button, input[type="button"] {
|
295
307
|
@include button(shiny, #ff0000);
|
296
308
|
}
|
297
309
|
|
@@ -324,6 +336,7 @@ The real power of the mixin is revealed when you pass in the optional color argu
|
|
324
336
|
|
325
337
|
@ background-image(*args)
|
326
338
|
@ border-radius(*args)
|
339
|
+
@ box-shadow(*args)
|
327
340
|
@ box-sizing(*args)
|
328
341
|
|
329
342
|
flex-box
|
@@ -352,6 +365,7 @@ The real power of the mixin is revealed when you pass in the optional color argu
|
|
352
365
|
|
353
366
|
#Addons
|
354
367
|
--------------------------------
|
368
|
+
animation-keyframes (fade-in, fade-out)
|
355
369
|
@ button(*args)
|
356
370
|
@ position(*args)
|
357
371
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 3
|
9
|
+
version: 0.1.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Phil LaPier
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-
|
19
|
+
date: 2011-08-05 00:00:00 -04:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -55,6 +55,7 @@ files:
|
|
55
55
|
- LICENSE
|
56
56
|
- Rakefile
|
57
57
|
- app/assets/stylesheets/_bourbon.css.scss
|
58
|
+
- app/assets/stylesheets/addons/_animation-keyframes.css.scss
|
58
59
|
- app/assets/stylesheets/addons/_button.css.scss
|
59
60
|
- app/assets/stylesheets/addons/_position.css.scss
|
60
61
|
- app/assets/stylesheets/css3/_animation.css.scss
|