From 9528420561340b58855236f99554c44c874dfea0 Mon Sep 17 00:00:00 2001 From: bennyschudel Date: Wed, 30 Mar 2011 02:58:09 -0700 Subject: [PATCH 1/3] Added fadeto color function --- lib/less/functions.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/less/functions.js b/lib/less/functions.js index 5d2d89c0..445fc36e 100644 --- a/lib/less/functions.js +++ b/lib/less/functions.js @@ -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; From 5130179dc531e0c45b117a9a4c2a79655501b09a Mon Sep 17 00:00:00 2001 From: bennyschudel Date: Wed, 30 Mar 2011 03:02:09 -0700 Subject: [PATCH 2/3] renamed fadeto to fade --- lib/less/functions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/less/functions.js b/lib/less/functions.js index 445fc36e..4923fbf0 100644 --- a/lib/less/functions.js +++ b/lib/less/functions.js @@ -86,7 +86,7 @@ tree.functions = { hsl.a = clamp(hsl.a); return hsla(hsl); }, - fadeto: function (color, amount) { + fade: function (color, amount) { var hsl = color.toHSL(); hsl.a = amount.value / 100; From a69cb4e2a19b5b7d99abbcd2d5398172ca1e3636 Mon Sep 17 00:00:00 2001 From: Idris Mokhtarzada Date: Wed, 17 Aug 2011 15:36:20 -0300 Subject: [PATCH 3/3] Support @-moz-keyframes as well as @-webkit-keyframes. --- lib/less/parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/less/parser.js b/lib/less/parser.js index 8ca4e610..b03b046e 100644 --- a/lib/less/parser.js +++ b/lib/less/parser.js @@ -966,7 +966,7 @@ less.Parser = function Parser(env) { if (value = $(this['import'])) { return value; - } else if (name = $(/^@media|@page/) || $(/^@(?:-webkit-)?keyframes/)) { + } else if (name = $(/^@media|@page/) || $(/^@(?:-webkit-|-moz-)?keyframes/)) { types = ($(/^[^{]+/) || '').trim(); if (rules = $(this.block)) { return new(tree.Directive)(name + " " + types, rules);