Merge branch 'master' of github.com:cloudhead/less.js

This commit is contained in:
cloudhead
2011-08-20 10:15:49 -04:00
2 changed files with 8 additions and 1 deletions

View File

@@ -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;

View File

@@ -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);