mirror of
https://github.com/less/less.js.git
synced 2026-02-08 22:15:04 -05:00
Merge remote-tracking branch 'origin/master' into 2_0_0
Conflicts: CHANGELOG.md lib/less/index.js lib/less/parser/parser.js lib/less/tree/dimension.js
This commit is contained in:
@@ -455,7 +455,7 @@ var Parser = function Parser(env, imports) {
|
||||
return;
|
||||
}
|
||||
|
||||
var value = parserInput.$re(/^([+-]?\d*\.?\d+)(%|[a-z]+)?/);
|
||||
var value = parserInput.$re(/^([+-]?\d*\.?\d+)(%|[a-z]+)?/i);
|
||||
if (value) {
|
||||
return new(tree.Dimension)(value[1], value[2]);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ Unit.prototype.compare = function (other) {
|
||||
return this.is(other.toString()) ? 0 : -1;
|
||||
};
|
||||
Unit.prototype.is = function (unitString) {
|
||||
return this.toString() === unitString;
|
||||
return this.toString().toUpperCase() === unitString.toUpperCase();
|
||||
};
|
||||
Unit.prototype.isLength = function () {
|
||||
return Boolean(this.toCSS().match(/px|em|%|in|cm|mm|pc|pt|ex/));
|
||||
|
||||
Reference in New Issue
Block a user