Skip to content

Commit 5bdb765

Browse files
committed
Beta 4
1 parent b4231f2 commit 5bdb765

File tree

4 files changed

+31
-24
lines changed

4 files changed

+31
-24
lines changed

dist/less-1.4.0-beta.js

+18-18
Original file line numberDiff line numberDiff line change
@@ -3124,7 +3124,7 @@ tree.Expression.prototype = {
31243124
if (inParenthesis) {
31253125
env.outOfParenthesis();
31263126
}
3127-
if (this.parens && this.parensInOp && !(env.isMathsOn()) && !doubleParen) {
3127+
if (this.parens && this.parensInOp && !(env.isMathOn()) && !doubleParen) {
31283128
returnValue = new(tree.Paren)(returnValue);
31293129
}
31303130
return returnValue;
@@ -3392,17 +3392,17 @@ tree.Media.prototype = {
33923392
this.ruleset.debugInfo = this.debugInfo;
33933393
media.debugInfo = this.debugInfo;
33943394
}
3395-
var strictMathsBypass = false;
3396-
if (env.strictMaths === false) {
3397-
strictMathsBypass = true;
3398-
env.strictMaths = true;
3395+
var strictMathBypass = false;
3396+
if (!env.strictMath) {
3397+
strictMathBypass = true;
3398+
env.strictMath = true;
33993399
}
34003400
try {
34013401
media.features = this.features.eval(env);
34023402
}
34033403
finally {
3404-
if (strictMathsBypass) {
3405-
env.strictMaths = false;
3404+
if (strictMathBypass) {
3405+
env.strictMath = false;
34063406
}
34073407
}
34083408

@@ -3742,7 +3742,7 @@ tree.Negative.prototype = {
37423742
return '-' + this.value.toCSS(env);
37433743
},
37443744
eval: function (env) {
3745-
if (env.isMathsOn()) {
3745+
if (env.isMathOn()) {
37463746
return (new(tree.Operation)('*', [new(tree.Dimension)(-1), this.value])).eval(env);
37473747
}
37483748
return new(tree.Negative)(this.value.eval(env));
@@ -3767,7 +3767,7 @@ tree.Operation.prototype = {
37673767
b = this.operands[1].eval(env),
37683768
temp;
37693769

3770-
if (env.isMathsOn()) {
3770+
if (env.isMathOn()) {
37713771
if (a instanceof tree.Dimension && b instanceof tree.Color) {
37723772
if (this.op === '*' || this.op === '+') {
37733773
temp = b, b = a, a = temp;
@@ -3903,10 +3903,10 @@ tree.Rule.prototype = {
39033903
}
39043904
},
39053905
eval: function (env) {
3906-
var strictMathsBypass = false;
3907-
if (this.name === "font" && env.strictMaths === false) {
3908-
strictMathsBypass = true;
3909-
env.strictMaths = true;
3906+
var strictMathBypass = false;
3907+
if (this.name === "font" && env.strictMath === false) {
3908+
strictMathBypass = true;
3909+
env.strictMath = true;
39103910
}
39113911
try {
39123912
return new(tree.Rule)(this.name,
@@ -3915,8 +3915,8 @@ tree.Rule.prototype = {
39153915
this.index, this.currentFileInfo, this.inline);
39163916
}
39173917
finally {
3918-
if (strictMathsBypass) {
3919-
env.strictMaths = false;
3918+
if (strictMathBypass) {
3919+
env.strictMath = false;
39203920
}
39213921
}
39223922
},
@@ -4646,7 +4646,7 @@ tree.jsify = function (obj) {
46464646
'verbose', // whether to log more activity
46474647
'compress', // whether to compress
46484648
'ieCompat', // whether to enforce IE compatibility (IE8 data-uri)
4649-
'strictMaths', // whether maths has to be within parenthesis
4649+
'strictMath', // whether math has to be within parenthesis
46504650
'strictUnits' // whether units need to evaluate correctly
46514651
];
46524652

@@ -4667,8 +4667,8 @@ tree.jsify = function (obj) {
46674667
this.parensStack.pop();
46684668
};
46694669

4670-
tree.evalEnv.prototype.isMathsOn = function () {
4671-
return this.strictMaths === false ? true : (this.parensStack && this.parensStack.length);
4670+
tree.evalEnv.prototype.isMathOn = function () {
4671+
return this.strictMath ? (this.parensStack && this.parensStack.length) : true;
46724672
};
46734673

46744674
tree.evalEnv.prototype.isPathRelative = function (path) {

dist/less-1.4.0-beta.min.js

+11-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/less/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var path = require('path'),
55
fs = require('fs');
66

77
var less = {
8-
version: [1, 4, '0-b3'],
8+
version: [1, 4, '0-b4'],
99
Parser: require('./parser').Parser,
1010
importer: require('./parser').importer,
1111
tree: require('./tree'),

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "less",
3-
"version": "1.4.0-b3",
3+
"version": "1.4.0-b4",
44
"description": "Leaner CSS",
55
"homepage": "http://lesscss.org",
66
"author": "Alexis Sellier <[email protected]>",

0 commit comments

Comments
 (0)