diff --git a/lib/less/parser.js b/lib/less/parser.js index 7670d6df3..bcb66a48a 100644 --- a/lib/less/parser.js +++ b/lib/less/parser.js @@ -630,7 +630,7 @@ less.Parser = function Parser(env) { var value, c = input.charCodeAt(i); if ((c > 57 || c < 45) || c === 47) return; - if (value = $(/^(-?\d*\.?\d+)(px|%|em|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn)?/)) { + if (value = $(/^(-?\d*\.?\d+)(px|%|em|rem|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn)?/)) { return new(tree.Dimension)(value[1], value[2]); } }, diff --git a/test/css/operations.css b/test/css/operations.css index 30a941b4f..fb9e0aff7 100644 --- a/test/css/operations.css +++ b/test/css/operations.css @@ -26,6 +26,9 @@ .shorthands { padding: -1px 2px 0 -4px; } +.rem-dimensions { + font-size: 5.5rem; +} .colors { color: #123; border-color: #334455; diff --git a/test/less/operations.less b/test/less/operations.less index e7c974b34..46b0aa393 100644 --- a/test/less/operations.less +++ b/test/less/operations.less @@ -36,6 +36,10 @@ padding: -1px 2px 0 -4px; // } +.rem-dimensions { + font-size: 20rem / 5 + 1.5rem; // 5.5rem +} + .colors { color: #123; // #112233 border-color: #234 + #111111; // #334455