bourbon-compass 3.1.3 → 3.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,18 +6,18 @@
6
6
  }
7
7
 
8
8
  @function _border-add-prefix($images, $vendor: false) {
9
- $border-image: ();
9
+ $border-image: null;
10
10
  $images-type: type-of(nth($images, 1));
11
11
  $first-var: nth(nth($images, 1), 1); // Get type of Gradient (Linear || radial)
12
12
 
13
13
  // If input is a gradient
14
14
  @if $images-type == string {
15
15
  @if ($first-var == "linear") or ($first-var == "radial") {
16
- @for $i from 2 through length($images) {
17
- $gradient-type: nth($images, 1); // Get type of gradient (linear || radial)
18
- $gradient-args: nth($images, $i); // Get actual gradient (red, blue)
19
- $border-image: _render-gradients($gradient-args, $gradient-type, $vendor);
20
- }
16
+ $gradient-type: nth($images, 1); // Get type of gradient (linear || radial)
17
+ $gradient-pos: nth($images, 2); // Get gradient position
18
+ $gradient-args: nth($images, 3); // Get actual gradient (red, blue)
19
+ $gradient-positions: _gradient-positions-parser($gradient-type, $gradient-pos);
20
+ $border-image: _render-gradients($gradient-positions, $gradient-args, $gradient-type, $vendor);
21
21
  }
22
22
  // If input is a URL
23
23
  @else {
@@ -26,17 +26,18 @@
26
26
  }
27
27
  // If input is gradient or url + additional args
28
28
  @else if $images-type == list {
29
- @for $i from 1 through length($images) {
30
- $type: type-of(nth($images, $i)); // Get type of variable - List or String
29
+ $type: type-of(nth($images, 1)); // Get type of variable - List or String
31
30
 
32
- // If variable is a list - Gradient
33
- @if $type == list {
34
- $gradient-type: nth(nth($images, $i), 1); // Get type of gradient (linear || radial)
35
- $gradient-args: nth(nth($images, $i), 2); // Get actual gradient (red, blue)
36
- $border-image: _render-gradients($gradient-args, $gradient-type, $vendor);
37
- }
38
- // If variable is a string - Image or number
39
- @else if ($type == string) or ($type == number) {
31
+ // If variable is a list - Gradient
32
+ @if $type == list {
33
+ $gradient: nth($images, 1);
34
+ $gradient-type: nth($gradient, 1); // Get type of gradient (linear || radial)
35
+ $gradient-pos: nth($gradient, 2); // Get gradient position
36
+ $gradient-args: nth($gradient, 3); // Get actual gradient (red, blue)
37
+ $gradient-positions: _gradient-positions-parser($gradient-type, $gradient-pos);
38
+ $border-image: _render-gradients($gradient-positions, $gradient-args, $gradient-type, $vendor);
39
+
40
+ @for $i from 2 through length($images) {
40
41
  $border-image: append($border-image, nth($images, $i));
41
42
  }
42
43
  }
@@ -51,3 +52,4 @@
51
52
  // @include border-image(linear-gradient(45deg, orange, yellow) stretch);
52
53
  // @include border-image(linear-gradient(45deg, orange, yellow) 20 30 40 50 stretch round);
53
54
  // @include border-image(radial-gradient(top, cover, orange, yellow, orange));
55
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bourbon-compass
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.3
4
+ version: 3.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-15 00:00:00.000000000 Z
12
+ date: 2013-04-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: compass