From 549c529210a6884e8f6293c110201fe591439f86 Mon Sep 17 00:00:00 2001 From: pyoor Date: Tue, 25 Apr 2017 11:03:55 -0400 Subject: [PATCH] Refactor make.unit.units --- lib/make/fonts.js | 2 +- lib/make/units.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/make/fonts.js b/lib/make/fonts.js index 75fc1c7..b5433a2 100644 --- a/lib/make/fonts.js +++ b/lib/make/fonts.js @@ -31,7 +31,7 @@ make.font = { /* values */ ["larger", "smaller"], /* values */ - make.numbers.unsignedNumber() + make.units.lengthUnit(), + make.numbers.unsignedNumber() + make.units.units(), /* values */ make.units.percent(), /* Global values */ diff --git a/lib/make/units.js b/lib/make/units.js index af04948..a4f25e5 100644 --- a/lib/make/units.js +++ b/lib/make/units.js @@ -2,14 +2,14 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -make.units = { - lengthUnit: function () { +make.unit = { + units: function () { return random.pick([ "px", "em", "ex", "ch", "rem", "mm", "cm", "in", "pt", "pc", "%" ]); }, length: function () { - return make.numbers.number() + make.units.lengthUnit(); + return make.numbers.number() + make.units.units(); }, percent: function () { return make.numbers.number() + "%";