Refactor make.unit.unit
This commit is contained in:
parent
2e65a4bea3
commit
ac7ac78d92
2 changed files with 4 additions and 4 deletions
|
@ -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 () {
|
||||
|
|
|
@ -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() + "%";
|
||||
|
|
Loading…
Reference in a new issue