From 240c062a9a4f9af556c756718ceab6eacbddd38c Mon Sep 17 00:00:00 2001 From: Christoph Diehl Date: Wed, 12 Apr 2017 22:18:23 +0300 Subject: [PATCH] Add units.js --- make/units.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 make/units.js diff --git a/make/units.js b/make/units.js new file mode 100644 index 0000000..46b1eb3 --- /dev/null +++ b/make/units.js @@ -0,0 +1,13 @@ +make.units = { + lengthUnit: function () { + return random.pick([ + "px", "em", "ex", "ch", "rem", "mm", "cm", "in", "pt", "pc", "%" + ]); + }, + length: function () { + return make.number() + make.lengthUnit(); + }, + percent: function () { + return make.number() + "%"; + }, +};