Skip to content

Commit

Permalink
Bump to 3.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
jedfoster committed Apr 23, 2013
1 parent 4201593 commit 6e6ae10
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
4 changes: 2 additions & 2 deletions bourbon-compass.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Gem::Specification.new do |s|
# Release Specific Information
s.version = "3.1.3"
s.date = "2013-04-15"
s.version = "3.1.4"
s.date = "2013-04-21"

# Gem Details
s.name = "bourbon-compass"
Expand Down
34 changes: 18 additions & 16 deletions stylesheets/bourbon/css3/_border-image.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
}

@function _border-add-prefix($images, $vendor: false) {
$border-image: ();
$border-image: null;
$images-type: type-of(nth($images, 1));
$first-var: nth(nth($images, 1), 1); // Get type of Gradient (Linear || radial)

// If input is a gradient
@if $images-type == string {
@if ($first-var == "linear") or ($first-var == "radial") {
@for $i from 2 through length($images) {
$gradient-type: nth($images, 1); // Get type of gradient (linear || radial)
$gradient-args: nth($images, $i); // Get actual gradient (red, blue)
$border-image: _render-gradients($gradient-args, $gradient-type, $vendor);
}
$gradient-type: nth($images, 1); // Get type of gradient (linear || radial)
$gradient-pos: nth($images, 2); // Get gradient position
$gradient-args: nth($images, 3); // Get actual gradient (red, blue)
$gradient-positions: _gradient-positions-parser($gradient-type, $gradient-pos);
$border-image: _render-gradients($gradient-positions, $gradient-args, $gradient-type, $vendor);
}
// If input is a URL
@else {
Expand All @@ -26,17 +26,18 @@
}
// If input is gradient or url + additional args
@else if $images-type == list {
@for $i from 1 through length($images) {
$type: type-of(nth($images, $i)); // Get type of variable - List or String
$type: type-of(nth($images, 1)); // Get type of variable - List or String

// If variable is a list - Gradient
@if $type == list {
$gradient-type: nth(nth($images, $i), 1); // Get type of gradient (linear || radial)
$gradient-args: nth(nth($images, $i), 2); // Get actual gradient (red, blue)
$border-image: _render-gradients($gradient-args, $gradient-type, $vendor);
}
// If variable is a string - Image or number
@else if ($type == string) or ($type == number) {
// If variable is a list - Gradient
@if $type == list {
$gradient: nth($images, 1);
$gradient-type: nth($gradient, 1); // Get type of gradient (linear || radial)
$gradient-pos: nth($gradient, 2); // Get gradient position
$gradient-args: nth($gradient, 3); // Get actual gradient (red, blue)
$gradient-positions: _gradient-positions-parser($gradient-type, $gradient-pos);
$border-image: _render-gradients($gradient-positions, $gradient-args, $gradient-type, $vendor);

@for $i from 2 through length($images) {
$border-image: append($border-image, nth($images, $i));
}
}
Expand All @@ -51,3 +52,4 @@
// @include border-image(linear-gradient(45deg, orange, yellow) stretch);
// @include border-image(linear-gradient(45deg, orange, yellow) 20 30 40 50 stretch round);
// @include border-image(radial-gradient(top, cover, orange, yellow, orange));

0 comments on commit 6e6ae10

Please sign in to comment.