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 */
|
/* <relative-size> values */
|
||||||
["larger", "smaller"],
|
["larger", "smaller"],
|
||||||
/* <length> values */
|
/* <length> values */
|
||||||
make.number.unsignedNumber() + make.units.units(),
|
make.number.unsignedNumber() + make.unit.unit(),
|
||||||
/* <percentage> values */
|
/* <percentage> values */
|
||||||
make.units.percent(),
|
make.unit.percent(),
|
||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
genericFamily: function () {
|
genericFamily: function () {
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
make.unit = {
|
make.unit = {
|
||||||
units: function () {
|
unit: function () {
|
||||||
return random.pick([
|
return random.pick([
|
||||||
"px", "em", "ex", "ch", "rem", "mm", "cm", "in", "pt", "pc", "%"
|
"px", "em", "ex", "ch", "rem", "mm", "cm", "in", "pt", "pc", "%"
|
||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
length: function () {
|
length: function () {
|
||||||
return make.number.any() + make.unit.units();
|
return make.number.any() + make.unit.unit();
|
||||||
},
|
},
|
||||||
percent: function () {
|
percent: function () {
|
||||||
return make.number.any() + "%";
|
return make.number.any() + "%";
|
||||||
|
|
Loading…
Reference in a new issue