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