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

This commit is contained in:
cloudhead
2011-02-25 18:56:25 -05:00
5 changed files with 17 additions and 5 deletions

View File

@@ -74,7 +74,8 @@ for (var i = 0; i < links.length; i++) {
less.refresh = function (reload) {
var startTime = endTime = new(Date);
var startTime, endTime;
startTime = endTime = new(Date);
loadStyleSheets(function (root, sheet, env) {
if (env.local) {

View File

@@ -94,7 +94,7 @@ less.Parser = function Parser(env) {
// Parse from a token, regexp or string, and move forward if match
//
function $(tok) {
var match, args, length, c, index, endIndex, k;
var match, args, length, c, index, endIndex, k, mem;
//
// Non-terminal
@@ -766,7 +766,7 @@ less.Parser = function Parser(env) {
// and an element name, such as a tag a class, or `*`.
//
element: function () {
var e, t;
var e, t, c;
c = $(this.combinator);
e = $(/^(?:[.#]?|:*)(?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/) || $('*') || $(this.attribute) || $(/^\([^)@]+\)/);
@@ -879,7 +879,7 @@ less.Parser = function Parser(env) {
}
},
rule: function () {
var name, value, c = input.charAt(i), important;
var name, value, c = input.charAt(i), important, match;
save();
if (c === '.' || c === '#' || c === '&') { return }

View File

@@ -61,7 +61,7 @@ tree.Color.prototype = {
for (var c = 0; c < 3; c++) {
result[c] = tree.operate(op, this.rgb[c], other.rgb[c]);
}
return new(tree.Color)(result);
return new(tree.Color)(result, this.alpha + other.alpha);
},
toHSL: function () {

View File

@@ -53,3 +53,6 @@ body {
color: red;
color: red;
}
.arguments {
border: 1px solid black;
}

View File

@@ -105,3 +105,11 @@ body {
#id-mixin();
#id-mixin;
}
.mixin-arguments () {
border: @arguments;
}
.arguments {
.mixin-arguments(1px, solid, black);
}