loosened restriction on css units (who knows what W3C will think up next)

This commit is contained in:
Marcel Jackwerth
2012-03-10 17:53:51 +01:00
committed by Luke Page
parent c98495a100
commit 61e7bd6fb1
6 changed files with 8407 additions and 1 deletions

View File

@@ -724,7 +724,7 @@ less.Parser = function Parser(env) {
//Is the first char of the dimension 0-9, '.', '+' or '-'
if ((c > 57 || c < 43) || c === 47 || c == 44) return;
if (value = $(/^([+-]?\d*\.?\d+)(px|%|em|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn|dpi|dpcm|dppx|rem|vw|vh|vmin|vm|ch)?/)) {
if (value = $(/^([+-]?\d*\.?\d+)(%|[a-z]+)?/)) {
return new(tree.Dimension)(value[1], value[2]);
}
},