Refactor make.unit.units

This commit is contained in:
pyoor 2017-04-25 11:03:55 -04:00
parent d1a498f1b7
commit 549c529210
2 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@ make.font = {
/* <relative-size> values */
["larger", "smaller"],
/* <length> values */
make.numbers.unsignedNumber() + make.units.lengthUnit(),
make.numbers.unsignedNumber() + make.units.units(),
/* <percentage> values */
make.units.percent(),
/* Global values */

View File

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