Permalink
Browse files

new gradient position syntax added (to bottom)

  • Loading branch information...
1 parent 2c463ef commit a7a9202a9dbd915d369d548b0aee8a5b6503ee9f @mrflix committed Jan 19, 2012
Showing with 11 additions and 1 deletion.
  1. +11 −1 js/css.js
View
@@ -13,6 +13,16 @@ var css = {
45: "bottom left",
0: "left"
},
+ newGradientDirections: {
+ 315: "to bottom right",
+ 270: "to bottom",
+ 225: "to bottom left",
+ 180: "to left",
+ 135: "to top left",
+ 90: "to top",
+ 45: "to top right",
+ 0: "to right"
+ },
/**
* @method cssGradient
* @param gradient {object}
@@ -32,7 +42,7 @@ var css = {
tempStops = style === "reflected" ? tools.reflectStops(stops) : stops;
if (this.directions[angle]) {
- pos = this.directions[angle];
+ pos = prefix === "" ? this.newGradientDirections[angle] : this.directions[angle];
} else {
pos = angle+"deg";
}

0 comments on commit a7a9202

Please sign in to comment.