This commit is contained in:
jurcovicovam
2014-09-05 16:31:26 +02:00
4 changed files with 6 additions and 2 deletions

View File

@@ -981,7 +981,7 @@ less.Parser = function Parser(env) {
return;
}
value = $re(/^([+-]?\d*\.?\d+)(%|[a-z]+)?/);
value = $re(/^([+-]?\d*\.?\d+)(%|[a-zA-Z]+)?/);
if (value) {
return new(tree.Dimension)(value[1], value[2]);
}

View File

@@ -224,7 +224,7 @@ tree.Unit.prototype = {
},
is: function (unitString) {
return this.toString() === unitString;
return this.toString().toUpperCase() === unitString.toUpperCase();
},
isLength: function () {

View File

@@ -135,6 +135,8 @@
percent: true;
em: true;
cat: true;
case-insensitive-1: true;
case-insensitive-2: true;
}
#alpha {
alpha: rgba(153, 94, 51, 0.6);

View File

@@ -145,6 +145,8 @@
percent: ispercentage(32%);
em: isem(32em);
cat: isunit(32cat, cat);
case-insensitive-1: isunit(32CAT, cat);
case-insensitive-2: isunit(32px, PX);
}
}