From cf4f8e5a714e8a4b03f3475b77eb62fa198b3d39 Mon Sep 17 00:00:00 2001 From: Luke Page Date: Fri, 30 Jan 2015 17:41:24 +0000 Subject: [PATCH] if strict units are off also use the denominator, if there is no numerator. Fixes #2418 --- lib/less/tree/unit.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/less/tree/unit.js b/lib/less/tree/unit.js index 0b8441df..21d7cd75 100644 --- a/lib/less/tree/unit.js +++ b/lib/less/tree/unit.js @@ -23,6 +23,8 @@ Unit.prototype.genCSS = function (context, output) { output.add(this.numerator[0]); // the ideal situation } else if (!strictUnits && this.backupUnit) { output.add(this.backupUnit); + } else if (!strictUnits && this.denominator.length) { + output.add(this.denominator[0]); } }; Unit.prototype.toString = function () {