mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
Merge branch 'master' of github.com:cloudhead/less.js
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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 }
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -53,3 +53,6 @@ body {
|
||||
color: red;
|
||||
color: red;
|
||||
}
|
||||
.arguments {
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
@@ -105,3 +105,11 @@ body {
|
||||
#id-mixin();
|
||||
#id-mixin;
|
||||
}
|
||||
|
||||
.mixin-arguments () {
|
||||
border: @arguments;
|
||||
}
|
||||
|
||||
.arguments {
|
||||
.mixin-arguments(1px, solid, black);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user