mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
Added fadeto color function
This commit is contained in:
@@ -86,6 +86,13 @@ tree.functions = {
|
||||
hsl.a = clamp(hsl.a);
|
||||
return hsla(hsl);
|
||||
},
|
||||
fadeto: function (color, amount) {
|
||||
var hsl = color.toHSL();
|
||||
|
||||
hsl.a = amount.value / 100;
|
||||
hsl.a = clamp(hsl.a);
|
||||
return hsla(hsl);
|
||||
},
|
||||
spin: function (color, amount) {
|
||||
var hsl = color.toHSL();
|
||||
var hue = (hsl.h + amount.value) % 360;
|
||||
|
||||
Reference in New Issue
Block a user