mirror of
https://github.com/less/less.js.git
synced 2026-05-01 03:00:22 -04:00
loosened restriction on css units (who knows what W3C will think up next)
This commit is contained in:
committed by
Luke Page
parent
c98495a100
commit
61e7bd6fb1
@@ -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]);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user