Refactor make.unit.unit

This commit is contained in:
pyoor 2017-04-25 11:24:56 -04:00
parent 2e65a4bea3
commit ac7ac78d92
2 changed files with 4 additions and 4 deletions

View File

@ -29,9 +29,9 @@ make.font = {
/* <relative-size> values */
["larger", "smaller"],
/* <length> values */
make.number.unsignedNumber() + make.units.units(),
make.number.unsignedNumber() + make.unit.unit(),
/* <percentage> values */
make.units.percent(),
make.unit.percent(),
]);
},
genericFamily: function () {

View File

@ -3,13 +3,13 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
make.unit = {
units: function () {
unit: function () {
return random.pick([
"px", "em", "ex", "ch", "rem", "mm", "cm", "in", "pt", "pc", "%"
]);
},
length: function () {
return make.number.any() + make.unit.units();
return make.number.any() + make.unit.unit();
},
percent: function () {
return make.number.any() + "%";