From 9e9e1a0e9d602e2b20acd11ac5efbcc41f2dab46 Mon Sep 17 00:00:00 2001 From: Ronak Desai Date: Thu, 4 Dec 2014 00:35:53 -0500 Subject: [PATCH] support for negative from angle --- mixins/background-image/background-image.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mixins/background-image/background-image.js b/mixins/background-image/background-image.js index 5257fbd..c32b7c9 100644 --- a/mixins/background-image/background-image.js +++ b/mixins/background-image/background-image.js @@ -59,7 +59,7 @@ backgroundImage.webkit = function backgroundImageWebkit(value) { } }); - value = value.replace(/(\d+)\s*deg/g, function(match, sub) { + value = value.replace(/(-?\d+)\s*deg/g, function(match, sub) { return 90 - sub + 'deg'; }).replace(/(linear|radial)-gradient/g, '-webkit-$1-gradient'); @@ -100,7 +100,7 @@ backgroundImage.moz = function backgroundImageMoz(value) { } }); - value = value.replace(/(\d+)\s*deg/g, function(match, sub) { + value = value.replace(/(-?\d+)\s*deg/g, function(match, sub) { return 90 - sub + 'deg'; }).replace(/(linear|radial)-gradient/g, '-moz-$1-gradient'); @@ -141,7 +141,7 @@ backgroundImage.opera = function backgroundImageOpera(value) { } }); - value = value.replace(/(\d+)\s*deg/g, function(match, sub) { + value = value.replace(/(-?\d+)\s*deg/g, function(match, sub) { return 90 - sub + 'deg'; }).replace(/(linear|radial)-gradient/g, '-o-$1-gradient');