Skip to content

Commit cf4f8e5

Browse files
committed
if strict units are off also use the denominator, if there is no numerator. Fixes #2418
1 parent edca7f4 commit cf4f8e5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/less/tree/unit.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Unit.prototype.genCSS = function (context, output) {
2323
output.add(this.numerator[0]); // the ideal situation
2424
} else if (!strictUnits && this.backupUnit) {
2525
output.add(this.backupUnit);
26+
} else if (!strictUnits && this.denominator.length) {
27+
output.add(this.denominator[0]);
2628
}
2729
};
2830
Unit.prototype.toString = function () {

0 commit comments

Comments
 (0)