From 16b3cf8e08d63f39dca6cd937a2038aa312778f2 Mon Sep 17 00:00:00 2001 From: Phil LaPier Date: Thu, 14 Jul 2011 22:11:48 -0400 Subject: [PATCH] Fixed bug with position of gradient-function --- app/assets/stylesheets/functions/_gradient.css.scss | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/functions/_gradient.css.scss b/app/assets/stylesheets/functions/_gradient.css.scss index f3db494d9..98154d61b 100644 --- a/app/assets/stylesheets/functions/_gradient.css.scss +++ b/app/assets/stylesheets/functions/_gradient.css.scss @@ -3,6 +3,7 @@ $G5: false, $G6: false, $G7: false, $G8: false, $G9: false, $G10: false) { + // Detect what type of value exists in $pos $pos-type: type-of(nth($pos, 1)); @@ -14,6 +15,14 @@ } $full: compact($G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10); - @return join($pos, $full, comma); - //@return $pos, $full; + + //If position was included in the mixin/function + @if type-of(nth($full, 1)) != color or transparent { + @return $full; + } + + //Else add the default position + @else { + @return join($pos, $full, comma); + } }