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() + "%"; + }, +};