diff --git a/lib/less/functions.js b/lib/less/functions.js index 804b9e6f..5348c9a2 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); }, + fade: 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; diff --git a/lib/less/parser.js b/lib/less/parser.js index 55e7b381..8f266f0e 100644 --- a/lib/less/parser.js +++ b/lib/less/parser.js @@ -961,7 +961,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);