mirror of
https://github.com/less/less.js.git
synced 2026-02-08 14:05:24 -05:00
Merge https://github.com/less/less.js into rhino
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ tree.Unit.prototype = {
|
||||
},
|
||||
|
||||
is: function (unitString) {
|
||||
return this.toString() === unitString;
|
||||
return this.toString().toUpperCase() === unitString.toUpperCase();
|
||||
},
|
||||
|
||||
isLength: function () {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user