Add units.js
This commit is contained in:
parent
5d7b77016c
commit
240c062a9a
|
@ -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() + "%";
|
||||||
|
},
|
||||||
|
};
|
Loading…
Reference in New Issue