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

4344
dist/less-1.4.0.js vendored Normal file

File diff suppressed because it is too large Load Diff

9
dist/less-1.4.0.min.js vendored Normal file

File diff suppressed because one or more lines are too long

4049
dist/less-rhino-1.4.0.js vendored Normal file

File diff suppressed because it is too large Load Diff

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]);
}
},

View File

@@ -38,4 +38,6 @@
conversion-metric-a: 30mm;
conversion-metric-b: 3cm;
conversion-imperial: 3in;
custom-unit: 420cheeseburgers*octocats;
custom-unit-cancelling: 2;
}

View File

@@ -76,4 +76,6 @@
conversion-metric-a: 20mm + 1cm;
conversion-metric-b: 1cm + 20mm;
conversion-imperial: 1in + 72pt + 6pc;
custom-unit: 42octocats * 10cheeseburgers;
custom-unit-cancelling: 8cats / 4cats;
}