mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -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
4344
dist/less-1.4.0.js
vendored
Normal file
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
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
4049
dist/less-rhino-1.4.0.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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]);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -38,4 +38,6 @@
|
||||
conversion-metric-a: 30mm;
|
||||
conversion-metric-b: 3cm;
|
||||
conversion-imperial: 3in;
|
||||
custom-unit: 420cheeseburgers*octocats;
|
||||
custom-unit-cancelling: 2;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user