octo-deno/make/units.js

14 lines
292 B
JavaScript
Raw Normal View History

2017-04-12 19:18:23 +00:00
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() + "%";
},
};